Image date

On this page:


<txp:image_date />

The image_date tag is a single tag that Textpattern will replace with the uploaded date of the current (or given) image. Should usually be used in an @@image form@@, although it may be used on its own providing you specify an id or name.


Tag will accept the following attributes (case-sensitive):

An id assigned at upload of an image to display. The IDs can be found on the Images panel.
Default: unset.
format="format string"
Override the default date format set in the Preferences panel.
Values: any valid strftime string values, since, iso8601 (ISO 8601 reference), w3cdtf (W3CDTF reference), or rfc822 (RFC 822 reference).
Default: the ‘Archive date format’ set in preferences.
name="image name"
An image to display, given by its image name as shown on the Images panel. If both name and id are specified, the id takes precedence.
Default: unset.


Example 1: Display additional image information

<txp:images category="mammals">
    <a href="<txp:image_url />">
        <txp:thumbnail />
    <div class="img-info">
        <txp:image_info type="caption, author" break=" by " />
        <txp:image_date format="%e %b %Y" />

Other tags used: images, image_url, image_info, thumbnail.


Version 4.3.0

Tag support added.

See something wrong in this document? Outdated info, a broken link, faulty code example, or whatever? Please open an issue and we’ll investigate.