Image Info 1.0

Free

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 Plugin

Documentation

↑ Top

Tag Pair

Image 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"}

Parameters

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"}

Single Variables

{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.

Conditionals

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"}

Installation

↑ Top
  1. Extract the .zip file to your desktop
  2. Move the pi.image_info.php file from its local folder to your EE install's /system/plugins folder on the server
  3. Go nuts.

Change Log

↑ Top
  • 1.0 — 10/6/2009 : Released

Support

↑ Top

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.

License

↑ Top

This one is free. Go nuts.