image
The image tag is a single tag that Textpattern will replace with the <img src=”…” /> HTML tag matching the image of the numeric id assigned by Textpattern when the image was uploaded via the TXP Images tab.
attributes
id="unset" (integer)
name="unset"
html_id="unset"
escape="html"
wraptag="unset"
class="unset"
style="unset"
width="width of image in database" (integer)
height="height of image in database" (integer)
genealogy
Version 4.3.0
Version 4.2.0
Version 4.0.7
Version 4.0.4
Display the given image
<txp:image id="42" />
What it does…
Displays the image uploaded as ID #42.
Apply a CSS class
<txp:image name="chickens.jpg" class="boxit" />
What it does…
Displays the image named “chickens.jpg” and assigns a CSS class called boxit to the <img> tag.
The style could be defined like this
img.boxit {
background: #fff;
border: 1px solid #ccc;
display: block;
margin: -5px 5px 5px -5px;
padding: 4px;
position: relative;
}
Had the wraptag attribute been used, the boxit class would have been applied to that instead of directly to the image.