
Originally Posted by
kuroi
Images not displaying on the product listing pages? Product listings not displaying on the product listing pages? Here's a possible answer - or at least most of one - hopefully an image expert can fill in the missing pieces.
Symptoms - a product listing page doesn't display properly. Indeed the HTML just stops dead - no warning, no error messages - just stops mid-page. Doesn't necessarily happen for all categories, and when you copy the code and database to another server, it works perfectly.
Here's where I tracked the above down to.
In bmz_image_handler.class.php there is a method (function) called get_resized_image (line 216).
This function in turn calls resize_mageIM and if that doesn't work, it calls resize_imageGD (lines 262 & 263). Most of my images were happily going down the former route, but one was going into resize_imageGD.
Along the way resize_imageGD calls load_imageGD (line 615). This is fine until it gets to $image = @imagecreatefromjpeg($src_name); - a standard PHP call to the GD library. However, although as line 629 verified, the function exists, control is never passed back. I don't know whether the same problem would exost with other image types - the client upon whose site this occurred is using only jpg images.
A check of the GD library version revealed that it was almost the latest (2.0.34) as opposed to 2.028 on my local server which worked without problem.
The big question is why is this image taking
A more interesting question is what made this particular image file behave differently to the other 800 or so on the site. The answer to which is ... I haven't got the foggiest idea.
I did notice that at 1MB+ it was a little on the large size, but it wasn't the biggest in terms of file size or physical dimensions. However, when I cut it down as a matter of good practise, the problem went away. The problem also went away kindoff when I commented out line 630, though, of course, no image was displayed, but the rest of the page was.
Hopefully somebody with more expertise in the image libraries may be able to fill in some of the gaps in this explanation.
Bookmarks