article_image
The article_image tag is a single tag. Textpattern will replace this tag with the <img src=”…” /> HTML tag matching the numeric ID or URL assigned when the article is posted.
The image to be associated with the tag is set under the Write tab. Click “Advanced Options” and enter either the URL of the image, or the Textpattern ID (a number set by Textpattern at upload) into the Article image field. Most of the time you will use the image ID here. Note that you can only assign a single image to each article.
Related: if_article_image
attributes
thumbnail="0" (boolean)
width="width of image in database" (integer)
height="height of image in database" (integer)
escape="html"
wraptag="unset"
class="unset"
html_id="unset"
style="unset"
genealogy
Version 4.3.0
Version 4.2.0
Version 4.0.7
Version 4.0.4
Use wraptag and class for styling
<txp:article_image wraptag="p" class="article-image" />
What this does…
This will wrap the image in paragraph tags, applying the class to the paragraph:
<p class="article-image"><img src="..." /></p>
Why you might do it…
It gives you full control over the image’s appearance using CSS.
Note
Without the wraptag, the class is applied directly to the img tag
Link thumbnail to the article
Used in an article list form this will display an article list consisting of hyperlinked article images’ thumbnails.
<txp:permlink><txp:article_image thumbnail="1" /></txp:permlink>
Other tags used: permlink