Name

image — general purpose tag for generating HTML <img> tags

ATTRIBUTES

Attribute

Pos.

Req.

Default

Description

src

Yes

Yes

Â

Image source. Can be a plain product SKU, or just the image basename (so
Interchange would probe for existing file formats), or a literal
(relative or absolute) URL.
If Interchange is let to search for file extensions, it will check for
.jpg,
.gif,
.png and
.jpeg in the same order as specified here.

alt

Â

Â

The description value from the
products database if SKU is specified instead of
a literal image filename. Otherwise, none.

Text to use in the <img>'s alt attribute.
By default, this will be filled with the
description from the product database
if a SKU (not a filename) is provided.

default

Â

Â

[scratch mv_imagedefault], if set.

Image filename (relative or absolute URL)
that will be used if no image for the SKU was found.

If ImageMagick is installed, you can display an arbitrary size of
the image, creating it if necessary. This would create a subdirectory
corresponding to the size, (i.e. "64x48") and copy the source image to it.
It would then use the mogrify command to resize.
This requires a writable image directory, of course.
If not found in the PATH,
the location of the mogrify can be defined with the
IMAGE_MOGRIFY variable.
This would also temporarily set umask to 2 during the creation of files
and directories.
The value is specified as
AxB,
A or
xB, followed by up to two
+- offset specifications,
followed by none or one of %@!<>.
For a complete syntax, see mogrify-geometry parameter.

check_date

Â

Â

0

Track original file's modification time and rebuild the resized image
when the source file changes? (This only makes sense with
makesize .)

DESCRIPTION

[image] is a general-purpose tag for generating HTML <img>
tags based on various settings.

It can test whether an image exists,
predetermine dimensions, retrieve image names from the
product database (the image field),
automatically pull product
descriptions from the database (for alt and
title attributes).