Reading Kuroi's comments in the 'mods that work with 1.5' thread made me think about image handler.
Obviously, Image handler has been the main tool for image resizing on most zen carts in the last few years. So, my initial thoughts were that not having it available in 1.5 was a major concern. Also, there was an element of sadness that some similar feature is not yet included in Zen as it is in many more recent carts.
However, after a bit of thought, I kind of ended up with a different thought process. I wondered what other people thought. Here are my thoughts to get a conversation started.
1. Image handler is actually a bit of a monster these days. A lot of that has to do with the 'creating resized images on the fly' approach and then caching them. Perhaps a step back to resizing on upload would be a better solution these days. As a suggestion, perhaps a resize to small, medium and large on upload is a way to go? Yes, of course, one would need a 'rebuild' feature in the situation where image sizes on the front end changed. (hmmm, this is kind of like automating the existing Zen Cart small/medium/large arrangement - so respect for the developers here)
2. A lot of the extra features in Image Handler are just not needed. These days if I want a fancy effect on an image then I would just build a jQuery module that did exactly what I wanted. I think that what I would want from a module that image handled is to provide me with re-sized versions of the images as the raw materials for this type of mod. The fancy, front-end, display stuff is better handled by bespoke modules that are tailored to do exactly what is needed.
So, what I see is a module that
--re-sizes on upload and saves in the appropriate folders.
--has a rebuild feature that will re-create the scaled images if the front end size changes.
--probably has an admin page for easily uploading additional images to products
--uses the existing Zen Cart code, perhaps adapted a bit, to select the correct size of image and use it.
That's about it really. It is simple and is not a huge programming challenge. I can't see how this would create increased security problems the way the present Image Handler is doing. But would be interested to know the thoughts of those of you with more security knowledge than me.
It is not as ######## ( ha ha I can't write s-e-x-y in this forum) as having 're-size and cache on the fly' but it is simple and straight-forward.
And again, if the default image handling in Zen Cart is likely to be changed in the near(ish) future it would be good to know so that not too much time was wasted coding a solution like this ( or making Image handler work with 1.5 in a secure way ) So if one of the devs could comment that would be great.
Bookmarks