[ic] [image] tab making assumptions

Davor Ocelic docelic at mail.inet.hr
Sun Nov 14 06:14:19 EST 2004

On Sun, 14 Nov 2004 10:25:00 -0000
"Adrian P Wilkinson" <junk at puffin.org> wrote:

> Howdy,
> Have been having a play around with the image tag and have discovered that 
> it is making certain assumptions regarding server configuration, at least in 
> this instance.  For example, when trying to use 'makesize' it has reported:

Yes, this tag is very dependent on the setup, especially when
makesize= is used.

> image tag: Unable to create image 
> '/www/www.sitename.co.uk/gfx/items/300x400/10100\10111.jpg'
> The problem with this is that images are actually kept under 
> /www/sitename/gfx/items/ so I've no idea where it picked up 
> /www/www.sitename.co.uk/gfx/items/ from and everything else on the site 
> appears to be workign as expected.  To get the above report I had to 
> manually create the above directory structure in order to see where it was 
> trying to output.

For makesize= to work, [image] needs to know two values:
a) ImageDir catalog directive (to properly form src=), and
b) DOCROOT catalog variable (to know filesystem path where the resized
   images are to be placed).

Since you did not provide us with the example of how you call
[image], nor gave your values for ImageDir and DOCROOT, my guess is that
a) You need "Variable DOCROOT /www/sitename" in catalog.cfg, and
b) Just "/gfx/items" (instead of "www.sitename.co.uk/gfx/items/")
   for ImageDir directive.

> Even if it was reporting the correct directory (which might explain why I 
> have to force=1 everything)

You can quickly check if it nailed the right location by using 
dir_only=1, src_only=1 or exists_only=1 [image] parameters and checking
the displayed path in your browser.

> it's having problems with the final 
> "10100\10111.jpg" part of the line; is there any way to get IC/ImageMagick 
> to be happier regarding the path and how do I go about fixing the image tag 
> in order to get it to pick up the correct directory?

What's your actual image name? Are you trying to have a literal escape
character ("\") in the file name?

-docelic at icdevgroup.org

More information about the interchange-users mailing list