image_info
The image_info tag is a single tag that Textpattern will replace with the relevant image data from the current image. Should usually be used in an image form, although it may be used on its own providing you specify an id or name.
attributes
id="unset" (integer)
name="unset"
type="caption"
wraptag="unset"
class="unset"
break="unset"
breakclass="unset"
escape="html"
genealogy
Version 4.3.0
Gallery thumbnail and caption
<txp:images category="mammals">
<txp:thumbnail />
<txp:image_info type="caption" wraptag="div" class="img_cap" />
</txp:images>
What it does…
Grabs all images from the mammals category and displays the image thumbnail itself along with the image caption surrounded with <div class=“img_cap”>…</div> tags. Note that the image IDs/names are not specified inside the container because they are automatically assigned from the <txp:images> tag for each image in the given category.
Multiple pieces of information at once
<txp:images category="birds, mammals" thumbnail="1" sort="category asc">
<txp:if_different>
<h4><txp:image_info type="category_title" /></h4>
</txp:if_different>
<txp:thumbnail wraptag="div" />
<txp:image_info type="w, h" wraptag="div" class="img_dims" break=" x " />
by <txp:image_info type="author" />
</txp:images>
What it does…
Shows the thumbnail of each image that has an assigned thumbnail image from the mammals and birds categories and, beneath each, show its dimensions width x height along with the author of the image. Since the list has been sorted by category, the <txp:if_different> conditional can be used to output the category title at the top of the list of images each time it changes.
Other tags used: images, thumbnail, if_different
Specific image information
<txp:image_info id="5" type="category_title" />
What it does
Displays the category_title of the category assigned to image ID 5.