In this case Store front
thanks
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison
That one's easy, then! When you call the zen_image() function and have IH loaded and enabled, that function (in turn) calls the IH function to handle that image. Net/net, that's the way to get a resized/cached version of the image.
Thanks
So I guess the other one it's difficult,... and that's the one I need. I didn't explain myself. The autocomplete is for the store front, but ,(still testing) I'm creating a json file in the admin area, so it's there that I need to get the IH (small) image path.
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison
The GitHub repository is in a bit of flux, but the released version is stable. Since you're using IH4, you're using the hashed version of the cache file naming.
I'd recently looked this up for a client, so here's the process, assuming that you're using the IH-4/5 default settings.
- Take the products_image definition from the products table in the database, let's call this $products_image.
- Prepend that value with the images' directory: $image_source = DIR_WS_IMAGES . $products_image;
- Append that value with the default settings: $image_source .= ('85' . '255:255:255' . 'Center');
- Create an md5-hash of that value: $cache_filename = md5($image_source);
That $cache_filename now contains the filename portion associated with the cached image. Images are stored in the /bmz_cache/$cache_filename[0]/$cache_filename.image.$dimensions.$extension, where $dimensions = $width . 'x' . $height (of the image) and $extension is the image-file's base extension.
That description's probably a bit muddy; just post back if you have additional questions.