[ic] usertag image: Does it work?

Jon Jensen interchange-users@icdevgroup.org
Wed Sep 11 10:11:04 2002


On Wed, 11 Sep 2002, Philip S. Hempel wrote:

> Well I figured what the hey lets tell the browser the file size as well
> on the fly to speed up the page download since I am putting all this
> other info out i.e (alt tags ...). I read some time ago about the image
> tag. I never saw it used in the demo store so I said damn lets make this
> work better.
> 
> Docs said that if I put a http path in it will not check and is always
> accepted and per your example it worked.
> 
> And by the way I am in a loop hence the use of loop-code
> 
> (each of the following yield the equivalent output)
> 
> [image src="http://wwww.blossomland.com/images/thumb/www500.jpg"]
> 
> [image sku="[loop-code]"  
> src="http://wwww.blossomland.com/images/thumb/www500.jpg"]
> 
> (with and without quotes on loop-code)
> 
> output for either is
> 
> <img 
> src="http://wwww.blossomland.com/images/thumb/www500.jpg">
> 
> so it kicks out the img src and the url but not a thing on the sku like
> the description field as would be expected hence the sku= field.

The [image] tag needs to have a local filename if you want it to determine 
the width and height of the image. When you give it an absolute 
(presumably remote) URL, it's not really much use, since it doesn't have 
any reasonably fast way of determining the image size.

What you should do is something like this:

[image imagesubdir=products sku="[loop-code]" border=0 alt="[loop-field 
title]"]

If all your products are directly in the images/ directory, you don't need 
the imagesubdir setting. The alt setting is optional. Use 'src' instead of 
'sku' if you aren't referring to something in your products table.

> Also to check one more thing, the images are under a symlink, should
> this matter?

No, that's fine.

Jon