[ic] Image tag

Jon Jensen jon at endpoint.com
Wed Sep 29 20:41:58 EDT 2004

On Tue, 28 Sep 2004, Jamie Neil wrote:

> I've been playing with the latest "Image" UserTag and hit a problem 
> which is either a bug or a limitation of the design - I'm not sure which 
> because I can't make out the code.
> If I do:
>    [image src="image.jpg" makesize="100x100"]
> it correctly creates a directory called "100x100" under the image root 
> and generates the thumbnail image with the same name as the original.
> If I then change the original image and call the tag again, the 
> thumbnail is not refreshed. But if I delete the thumbnail it regenerates 
> it correctly.
> Is this right or is there something wrong with my setup?

I believe this is how it's designed to work.

> If this is correct then is there any way of forcing the thumbnail to be 
> overwritten in certain circumstances (e.g. by overloading the "force" 
> attribute)?

That's one possibility.

> I thought it might be automated by comparing the datestamps on the 
> original and generated images, but I suppose this would take a lot more 
> time than simply checking that the generated file already exists.

That's another good option. You could add an attribute "freshen" (used in 
Zip and RPM to mean update when necessary) that would do that check.

If you modify the tag to do one of these things, please share your changes 
and we'll consider putting them into Interchange.


Jon Jensen
End Point Corporation
Software development with Interchange, Perl, PostgreSQL, Apache, Linux, ...

More information about the interchange-users mailing list