Re: Image Handler 2 Support Code fix?
Suggested code mod:
My image bmz cache was not clearing with the admin 'clear cache' link..
Referring to the suggestion in the php site..
http://uk.php.net/manual/en/class.dir.php
The line in v2's admin/includes/functions/extra_functions/ functions_bmz_io.php file, line 24 is
Code:
while ($file = $dir->read()) {
It sprang into life when I put
Code:
while (false !== ( $file = $dir->read() ) ) {
Am I right? btw the web server is a 4.4.4 php version
Re: Image Handler 2 Support
When does Image Handler 2 (for Zen Cart 1.2x) create the small and medium versions of the image?
How does it know when a new image for a product has been uploaded (replacing an existing image or an entirely new image)?
What happens to existing small and medium images when you change the desired sizes of the small and medium images?
I'm asking because I want to make sure that the right images are available at all times.
I'm updating the Zen Cart database in batch from an external application (Microsoft Access database) and uploading the large pictures manually to the images directory.
Daniel
p.s. I hope it is ok to post in this thread? It seems there is no separate category on the forum for Image Handler.
Re: Image Handler 2 Support
I'm sure someone else knows, but I think the bmz functons automatically kick in when an image is requested from the cart-side page display. But also you can call up individual product images with the handler admin, and play around.
You can always clear the cache (specially if you use my mod above!) and see how it gets filled up after a cart-side page request.
Presumably if you change an image size setting, the old images named .image.(width)x (height) will be left in the cache folders, new ones of appropriate size will generate on the next page request.
So each cached image has its size as part of the long filename, so different sized images are created to suit, and are unique to a particular size.
If you want to know if the page is using cached images, look at the picture url, if its cached, it has 'bmz_cache' in the image 'src' url, as it comes from that cache folder.
Incidentally I think I've found a way of running the cache outside of web space, anyone interested, do p.m me. But it needs code changes.
Re: Image Handler 2 Support
I have a strange problem. I upgraded to 1.3.6 and reinstalled the newest IH. All seemed to work. I took the time to delete the unneeded images in the small, large, medium directories in anticipation that IH will recreate the right sizes in the bmz_cache folder. I deleted the sub folders in bmz too just to make sure it will be recreated. Large versions of my pictures are now in the default images directory. As I understand everything should work now automatic. Well...it does for small and medium images, but when I click for a large pictures I get a fuzzy one. I look at the property and it shows way smaller file size then my original in the images folder. This particular large image does not to be calculated as it is 450x450 and my settings are set to max 500px. Path shows my image folder.
I don't understand what is going on but here is something interesting I found out. If I set image large max with to 440 (just 10px smaller then my original image) it gets generated in the bmz_cache folder and shows just fine!!! What is going on!
Btw with new uploaded images OTHER THAN THE SAME PICTURE NAME, everything works. I think somewhere something is cached? Maybe in the DB? I un-installed and re-installed IH in the admin. No better result. Pleas help.
Re: Image Handler 2 Support
Just wanted to mention this is still a test site not the ones in my signature.
:)
Re: Image Handler 2 Support
OK, I tried this now on my live site with one picture. I uploaded one large picture SP-02BR.jpg in my images directory with ftp. I deleted the corresponding pictures in small, large, medium folders. Now you can see what IH creates.
http://www.mydanilo.com/index.php?ma...products_id=18
Medium image gets created correctly in bmz folder. Large image ( if we can believe the property dialog) gets taken from the /image folder. But look at the file size: 3.98kb. This is crap, the image IS in the image folder and is 66.3kb big.
Where is this wrong info stored? Why is this going wrong?
Re: Image Handler 2 Support
Hi mydanilo
was at your site page given, BUT I get the ordinary product (cached) image as 13k, the popup large image as 69k as you said, its a BIG 708 pixels.
So it seems to work ok?
Yes I agree what you said... if the 'real' uploaded image is less size over-all, than the 'large' size, IH does not touch it, you get the real image from /image folder.
This is presumably also done because yes, you can get reduced quality from a cached resize, so by uploading a suitably sized pic, you avoid IH caching of it..
You can up the cached pics compression quality in the images section admin, to 100, its 85 default.
Large image is the pop-up one. If the pop-up image is 'too big' then IH comes in and makes a reduced size cached version the right size for 'large'.
Re: Image Handler 2 Support
Hi Hareslade,
I could shoot myself.....after the whole morning trying to figure this out, your reply triggered what is wrong. >>>> I HAD TO CLEAR THE CACHE OF MY BROWSER!!!!!
....and there.. it works! Thank you for testing it out for me.
And I thought the cache of the cart or some merging during upgrade or or.. but the closest possible thing I did not think of. WELL, I hope this will help somebody else at some point. Case closed.
:)
Re: Image Handler 2 Support
Please don't do yourself in:)
I find IE6 hangs on to locally cached images, Firefox is possibly better, and also Firefox **always** reads a changed css file, while IE6 ignores it usually.
Re: Image Handler 2 Support
Well, I am using Firfox 2.0. Cache did not refresh itself. I had to do it manually. I think one could set it to clear every time the browser closes. Maybe a good idea...