Image Info basically lets you pull file properties from all sorts of images and either display the info with set parameters, or lets you run conditionals on their values.
Alter your layout based on dimensions or ratio. Display file properties. Dream big.
Download PluginImage info uses a simple tag pair to evaluate and process the desired image:
{exp:image_info image="http://example.com/images/image.jpg"}
... your content here ...
{/exp:image_info"}
There's only one parameter: image, the absolute path of the image you want to evaluate.
Example:
{exp:image_info image="http://example.com/images/image.jpg"}
{width}: The pixel width of the image.
Sample output: "450"
{height}: The pixel height of the image.
Sample output: "300"
{ratio}: The ratio/orientation of the image.
Possible values: Landscape (wider than tall), Portrait (taller than wide) and Square (equal height and width)
{type}: The image type (e.g. Jpeg, PNG)
Possible values: jpg, png, gif, bmp, swf, psd, tif
{html}: Text string for exact image dimensions, useful for your tag. (e.g.
).
Sample output: width="450" height="300"
{bits}: the image's color bit value
Possible values: 8, 16, 32
{channels}: if the image is a jpg, you can output the channels value.
Possible values: "3" for RGB and "4" for CMYK
{mime}: The MIME type of the image, useful for correct HTTP Content-type headers, if needed.
ALL variables are available as conditionals.
Example:
{exp:image_info image="http://example.com/images/image.jpg"}
{if ratio == "vertical"}
{embed="embeds/.vertical_layout"}
{if:else}
{embed="embeds/.standard_layout"}
{/if}
{/exp:image_info"}
Technical support is available through email. If your question can be answered in 140 characters or less, feel free to hit us on Twitter too. No representations or guarantees are made regarding the response time in which support questions are answered, but we'll try to get right back to you.
