It pains me to see all this mass confusion and the same questions being posted over and over again. Enough already!!
I wrote this, read it, and then read it again.
Allow me to contribute yet another explanation of the basic concept of WHAT IH2 does in layman's terms.
---------------------------------------------------------------------------------------
Yes, the browser can resize an image simply by providing the width and height parameters that you wish to display.
However, if you do it that way, the entire image file still has to make it to the browser, so that the browser can alter the image.
You do realize how large the image files are?
If you have a screen full of thumbnails to display, using this methodology will tax a surfer's patience.
Clearly, the download of large image files to fill a screen of thumbnails is not a good idea.
Another draw back to browser resizing is the plain fact that the browser is not in the business of image editing.
The browser will resize the image without any regard for image quality.
Definitely a bad thing, unless you don't want to the customer to get a good look at what you're selling.
Therefore, it stands to reason that we don't want to rely on the browser to resize our images. Agreed!
The Generic ZenCart Scenario (without IH2)
The generic version of ZenCart provides a facility for us to upload and store PRE-sized images. That is to say, images that we have
sized, in advanced, into thumbnails, medium size, and large size images.
We name these files, so that we can determine which is which, as follows:
- THUMBNAIL==> imageA.jpg
- MEDIUM ==> imageA_MED.jpg
- LARGE ==> imageA_LRG.jpg
And, so that the system can find them we store them in separate folders as follows:
../ZenCart / IMAGES / imageA.jpg
../ZenCart / IMAGES / MEDIUM / imageA_MED.jpg
../ZenCart / IMAGES / LARGE / imageA_LRG.jpg
When you enter a new product, and you indicate an image file, that image file name is stored in the database as the primary image.
Zencart will look for that image in the main image folder called:
../ZenCart / IMAGES /.
I'm going to be honest, there is no way to make this any clearer.
Having to pre-resize three diferent images and maintain them in three separate folder is a colossal pain the rump.
Enter the IH2 contribution to ZenCart courtesy of Tim Kroeger. 
The IH2 ZenCart Scenario
With IH2, the whole idea of you having to PRE-size images has been deprecated, eradicated, erased, removed, and taken away.
Furthermore, the need to store product images in the MEDIUM and LARGE image folders has also been deprecated, eradicated, erased, removed, and taken away.
Read that again.
So what happens?
Using your favorite image editing software in the comfort of your computer, you create a single image of the product. It needs to be the largest size that you want to display on the screen. I chose 300x500 pixels, you can have a bigger size or a smaller a size, it's up to you. But remember the rule, smaller files load faster. It is beyond the scope of this posting, but a good idea to become familiar with image editing pitfalls.
Where do you put the images?
In the main image folder ONLY. Nowhere else, or they won't be found. IH2 is not going to look in the old folders! Put all your images in the main image folder: ../ZenCart / IMAGES / imageA.jpg
IH2 will look at the settings you placed in ADMIN > CONFIGURATION > IMAGES and use those settings to automatically create the other sized images
The very first time an image is required, IH2 will resize your large image into a thumbnail or medium image, and store it in the bmz_cache.
What's the bmz_cache?
I don't know if you noticed, but Tim Kroeger authored the IH2 contribution, and he operates a website called www.breakmyzencart.com.
It's a safe bet to say that bmz stands for "break my zencart".
Nonetheless, it is a cache of sub-folders where IH2 stores the presized images it automatically created the first time, so that it does not have to resize them again.
The image handler always checks the cache prior to resizing the image.
This is important! Try to remember.
Thumbnails and medium sized images are taken from the bmz_cache. So? If you modified the large image in the main image folder or you change the size parameters of the thumbnail and/or medium images, it will have no effect on the images already in the bmz_cache. Because they already exist in the bmz_cache, they will not be recreated. You have to remoooooove them from the bmz_cache to force IH2 to regenerate them.
How do I clear the bmz_cache?
In theory, you should go to ADMIN > TOOLS > IMAGE HANDLER2 and click. There is a link there called "Clear image cache". This link should clear the cache.
I usually use Filezilla to delete all of the subfolders in the bmz_cache. You, of course, can choose for yourself, which approach works best.
Additional Images?
Pay attention, this is not rocket science. We've been using imageA.jpg as an example. Let's say that imageA.jpg is the only image you have for the product, and you want to display additonal images. Great idea!!
Name the additional image imageA_anything.jpg and store it in the same folder with the rest of images. You can replace anything with anything you want.
I promise you, if you do what I just said, ZenCart will correlate all the images that have the same value to the left of the underscore. And, for those of you who don't know it yet, Lightbox will also find these additional images.
You can call them like this example:
- imageA.jpg
- imageA_01.jpg
- imageA_02.jpg
- imageA_red.jpg
- imageA_wackadoo.jpg
store them all in the main image folder, and they will all be considered images of the same product. But remember, there is only one main image and that's the one stored inthe database when you created the product in ADMIN > CATEGORIES > PRODUCTS.
Summary
Read this posting more than once. It was meant to be a simple clarification of concept, not a technical thesis on image editing. There is additional doumentation on Tim's website at www.breakmysencart.com/ihdoc.
If you appreciate his efforts, the poor guy's a perpetual student, send him some money before he starves to death. I'm sure he'll appreciate it.
Bookmarks