It seems I missed some posts lately, and I hope I answered all above here. If you are still waiting for an answer, please let me know.
It seems I missed some posts lately, and I hope I answered all above here. If you are still waiting for an answer, please let me know.
Boudewijn Sjouke
http://www.chinesedingen.nl
Hi. No worries. This one's a bit lengthy....
I posted here a question about re-uploading images to LRG that are not actually LRG. In a nutshell, many of my images are quite small and so they never actually need resizing from LRG, MED to small. Nevertheless, I need those images in place because people get stuck not realizing they can hit ESC to exit when there is no larger image view available.
My problem is that I can't apply a blanket solution in that there are many images that do have larger LRG files attached. I have no problem combining through IM, clicking upload and attaching a new "small" image to LRG. however, it's almost impossible to accomplish this task without IM. so far, I've done a 'diff folderA folderB' but the list is painfully long.
hopefully this makes more sense to you then it does when I reread myself ;)
Last edited by familynow; 20 Mar 2012 at 03:27 PM.
Do I understand correctly that in fact you want to use the same size image for small, medium and large, if only a small size original image is at hand?
In that case you may fool IM by setting the config values for medium and large images to the same values as small images. See image_manager.txt how to do this. IM should consider the image large enough to copy it to medium and large, et voila.
I didn't test this myself, but there is a good chance it will work.
And don't forget to put the old config values back to their original values when you're finished
Please let me know it this work-around works out!
Boudewijn Sjouke
http://www.chinesedingen.nl
First off, thanks for the quick reply!
Yes...Well, hm. Sort of. I need to do this _only_ for products which are _missing_ LRG images. A bit of background may be in order here...I wrote a slapstick script that incorporated imagemagick's mogrify and then ftp'd the results to my images folder. Somehow(not that surprising since I can't actually write scripts ! :)), the images that didn't get resized to smaller ratios didn't get uploaded. I'm guessing it's because they weren't 'touched'. Anyway...the result is that I'm missing TONS of LRG images. Almost all of which are images that would not have a larger size. Hence them not being touched by my script. Even if they did have larger originals, I have enough product turn-around not to care if the image isn't actually larger when the customer requests it. The script was a one time thing to get me started when we first added product (I had ~1,000+ images to handle in one go).
I just need to avoid that dreaded loop they don't understand how to exit from.
So...If I implement your suggestion(which I think I understand) will IM still know there is a missing LRG?
Last edited by familynow; 20 Mar 2012 at 04:30 PM.
Yes, IM will.
Best you can do is try this with one image, that will take no more than 5 minutes.
Keep in mind, that altering the config values will NOT make IM change all existing images. Unless you tell it to of course.
Another option is to change the ZC code. In includes/modules/main_product_image.php, the variables containing the different size image names are built. You could add an 'if', checking if the large image file exists, and if not, use the small image file instead. Can be done in one line of code.
Boudewijn Sjouke
http://www.chinesedingen.nl
Again, thank you for the quick response.
I knew that was an option! I just didn't know how or where to do it. I would think most ppl would want this IF statement if not only for convenience but as a generic fail-safe? Speaking of which, I did a little digging and...
Is this not what you're referring to?Code:// check for a medium image else use small if (!file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) { $products_image_medium = DIR_WS_IMAGES . $products_image; } else { $products_image_medium = DIR_WS_IMAGES . 'medium/' . $products_image_medium; } // check for a large image else use medium else use small if (!file_exists(DIR_WS_IMAGES . 'large/' . $products_image_large)) { if (!file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) { $products_image_large = DIR_WS_IMAGES . $products_image; } else { $products_image_large = DIR_WS_IMAGES . 'medium/' . $products_image_medium; } } else { $products_image_large = DIR_WS_IMAGES . 'large/' . $products_image_large; }
oh. I think I just realized the above is likely for the product image itself rather than the 'display larger' js function...