I recently upgraded to 0.9 and found that it requires GD to show any product image. It’s kind of ridiculous because 0.8 worked fine without GD. Looking at the code the GD extension resizes all the images to the proper size and saves them in a cache. I really hate running GD inside a regular Web request, but I was stuck because there’s nothing you can do to show the product image.
After digging through the code, i found some spots to throw some try catch and just send back the image that you have already uploaded.
In Mage/Catalog/Helper/Image.php around line 162
} catch( Exception $e ) {
//@@CUSTOMIZED: use whatever image you have $baseDir = Mage::getBaseDir('media'); $path = str_replace($baseDir . DS, "", $this->_getModel()->getBaseFile()); return Mage::getBaseUrl('media') . str_replace(DS, '/', $path); //@@CUSTOMIZED: use whatever image you have
This will return whatever image is available instead of blank if GD does not exist. (Actually, it does it for any exception, you can add try catch blocks around $url = $this->_getModel()->saveFile()->getUrl(); and $this->_getModel()->resize(); if you want to really be specific)