Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Magento image placeholder showing instead of my product images
 
Magazento
Sr. Member
 
Avatar
Total Posts:  155
Joined:  2010-01-08
Russia,Volgograd
 

hi all!
I have solved this. Try to delete cache and watermark in media directory.

Good luck

 
Magento Community Magento Community
Magento Community
Magento Community
 
PaulDon
Jr. Member
 
Total Posts:  12
Joined:  2008-10-22
 
Dazzuko - 18 March 2010 06:45 AM

SOLUTION:
Step 1:
disable all cache
System -> Cache Management: Select All, Choose \’Disable\’ and click Submit.

Step 2:
FTP to \app\code\core\Mage\Catalog\Model\product\Image.php
In this file, you need to go to line 310 (in Magento 1.4)
this line will be:

'cache',
change it to:
'',
eg. remove the word cache

upload the file and refresh your magento page to see all of your lovely images!

Hope that helps, it certainly worked for me.

Dan

This worked for me, THANK YOU!!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Joel Green
Jr. Member
 
Total Posts:  8
Joined:  2008-10-31
 

NONE of this works for me and my site has been working for 6 months

WTF is wrong with magento?? I cleared my image cache and NOW NOTHING IS ON THE FRONT END

 
Magento Community Magento Community
Magento Community
Magento Community
 
emile_rdam
Sr. Member
 
Total Posts:  89
Joined:  2010-05-20
 

Having same problem after moving to another server. Changing image.php and the other solutions didn’t work for me (1.4.1). The missing pictures are the larger ones.
I’m now replacing them with smaller pictures and this is working.

Fortunately I’m not having all my products already online but ti’s still al lot of work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
globing
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2010-03-01
 

i was checking this thread and tried a few things..

first check the php.ini and htaccess if safe_mode is off.. start off with that and then if that doesn’t work continue.. as the safe mode has to be switched off in all scenario’s..

 
Magento Community Magento Community
Magento Community
Magento Community
 
WMechelle
Member
 
Avatar
Total Posts:  52
Joined:  2009-12-16
 

Well after doing the upgrade I too have this same issue.  I have done all suggested here and still no main image.

I have noticed that when I go to add an image it allows me to upload it and saves it but will not allow you to select the image and save it.  When I go to the front end of the product the place holder image is showing and the image i added will show on the more details page but as a small click able image under the place holder.

All my memory is set correct, and not in safe mode.  I am using a custom template but so far with the upgrade this is the only issue I have not been able to fix.....  and omg was this a week of hell.

SO........

Anyone?  my site is www.ier-online.com so see what i mean.

Wendy

 
Magento Community Magento Community
Magento Community
Magento Community
 
malken00
Jr. Member
 
Total Posts:  17
Joined:  2008-07-30
 

Not sure if it will help anyone, but for me it was just a simple oversight on my part, forgetting to increase the memory limit for PHP from 32MB to 128MB. The pictures were so large on some items, the memory was being used up before it could render.

 
Magento Community Magento Community
Magento Community
Magento Community
 
globing
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2010-03-01
 

my problem was this:

first check the php.ini and htaccess if safe_mode is off.. start off with that and then if that doesn’t work continue.. as the safe mode has to be switched off in all scenario’s..

so i did and solved it party then the rest i had to re-upload again..

now another problem shows up:

the cross-sell and related products images are not set correctly..they either show the placeholder or they show the wrong product image of the related products/cross-seel product.

does somebody know how this can be?
and if possible to turn it of temporary..

 
Magento Community Magento Community
Magento Community
Magento Community
 
HalalMango
Jr. Member
 
Total Posts:  1
Joined:  2010-09-29
 

It was a directory ownership issue for me.

The cache directory had 755 permissions, but it was owned by my personal account, not by the process running the web server.

(This means my user could write to the directory, but apache as “www-data” could not)

just fyi.

 
Magento Community Magento Community
Magento Community
Magento Community
 
cauldronic
Jr. Member
 
Total Posts:  3
Joined:  2008-08-13
 
HalalMango - 29 September 2010 07:04 PM

It was a directory ownership issue for me.

The cache directory had 755 permissions, but it was owned by my personal account, not by the process running the web server.

(This means my user could write to the directory, but apache as “www-data” could not)

just fyi.

Same for me. This can happen after moving or copying the installation. Was not able to change the ownership with ssh. So I copied the cache dir with ftp, renamed the old cache dit to ‘cache-BACKUP’ and the copy to ‘cache’. Changed permissions to 755. Solved it for me. Hopes this is helpfull for somebody.

 
Magento Community Magento Community
Magento Community
Magento Community
 
johjoh
Member
 
Total Posts:  39
Joined:  2010-02-25
 

Ok, for me it was something different. I import products using the Mage-Classes. The problem was connected to the scope: I added the image on “website-level” and didn’t save before switching to “store-view-level” to set the product-name.

My (wrong) code was something like this:

$product = new Mage_Catalog_Model_Product();
$product->setSku("12345")
    ->
setStatus(1)
    ->
setWebsiteIds(array('1'))
    ->
setTypeId('simple')
    ->
setAttributeSetId('4')
    ->
addImageToMediaGallery($path,array('thumbnail','small_image','image'),false,false)
    ->
setStoreId('1')
    ->
setName($name_german)
    ->
save();

What you need to do is saving the product with all website-level data and create a new object to set store-view specific data.
(The function to set the store-view is setStoreId() and NOT setStoreViewId() which is quite confusing)

So the correct way is:

$product = new Mage_Catalog_Model_Product();
$product->setSku("12345")
    ->
setStatus(1)
    ->
setWebsiteIds(array('1'))
    ->
setTypeId('simple')
    ->
setAttributeSetId('4')
    ->
addImageToMediaGallery($path,array('thumbnail','small_image','image'),false,false)
    ->
save();

$id $product->getId();

// In my case there are two store-views, one for German, one for English
$product_de = new Mage_Catalog_Model_Product();
$product_de->setStoreId('1')
    ->
load($id)
    ->
setName($name_de)
    ->
save();

$product_en = new Mage_Catalog_Model_Product();
$product_en->setStoreId('2')
    ->
load($id)
    ->
setName($name_en)
    ->
save();

Cheers,
Johannes

 
Magento Community Magento Community
Magento Community
Magento Community
 
PatrickTT
Jr. Member
 
Total Posts:  22
Joined:  2010-10-14
 
jackcobain - 15 April 2009 11:46 PM

Hello guys,

i just solved the problem that we all are facing. smile hope it will help you all.

file is -> app/code/core/mage/catalog/model/product/image.php


around the line 274: there is an array

$path = array(
Mage::getSingleton(’catalog/product_media_config’)->getBaseMediaPath(),
‘cache’,
Mage::app()->getStore()->getId(),
$path[] = $this->getDestinationSubdir()
);

put below code instead of above

$path = array(
Mage::getSingleton(’catalog/product_media_config’)->getBaseMediaPath(),
‘’,
Mage::app()->getStore()->getId(),
$path[] = $this->getDestinationSubdir()
);

and it will start working smile

let me know your response.

Cheers,
jackcobain

worked for me smile thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
galagagod
Jr. Member
 
Total Posts:  17
Joined:  2010-02-09
 

SOLVED! Well at least in 1.4… haven’t tried it anything else.

Well I saw EVERYONES post because I had a client who needed this fix.  In reality… everyone was right for a variety of reasons.  The true problem I found was with the watermark.  But you tried that right?  And you don’t even want a stupid watermark on your images anyway right?  That’s what I said… so I just got rid of it entirely.

This is in Magento 1.4.0.0 in the app/code/core/Mage/Catalog/Model/Product/Image.php file.

Around line 563, search for

$baseDir Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath();

        if( 
file_exists($baseDir '/watermark/stores/' Mage::app()->getStore()->getId() . $file) ) {
            $filePath 
$baseDir '/watermark/stores/' Mage::app()->getStore()->getId() . $file;
        
elseif ( file_exists($baseDir '/watermark/websites/' Mage::app()->getWebsite()->getId() . $file) ) {
            $filePath 
$baseDir '/watermark/websites/' Mage::app()->getWebsite()->getId() . $file;
        
elseif ( file_exists($baseDir '/watermark/default/' $file) ) {
            $filePath 
$baseDir '/watermark/default/' $file;
        
elseif ( file_exists($baseDir '/watermark/' $file) ) {
            $filePath 
$baseDir '/watermark/' $file;
        
else {
            $baseDir 
Mage::getDesign()->getSkinBaseDir();
            if( 
file_exists($baseDir $file) ) {
                $filePath 
$baseDir $file;
            
}
        }

And just comment out the watermark entirely.

$baseDir Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath();

       
/* if( file_exists($baseDir . '/watermark/stores/' . Mage::app()->getStore()->getId() . $file) ) {
            $filePath = $baseDir . '/watermark/stores/' . Mage::app()->getStore()->getId() . $file;
        } elseif ( file_exists($baseDir . '/watermark/websites/' . Mage::app()->getWebsite()->getId() . $file) ) {
            $filePath = $baseDir . '/watermark/websites/' . Mage::app()->getWebsite()->getId() . $file;
        } elseif ( file_exists($baseDir . '/watermark/default/' . $file) ) {
            $filePath = $baseDir . '/watermark/default/' . $file;
        } elseif ( file_exists($baseDir . '/watermark/' . $file) ) {
            $filePath = $baseDir . '/watermark/' . $file;
        } else {
            $baseDir = Mage::getDesign()->getSkinBaseDir();
            if( file_exists($baseDir . $file) ) {
                $filePath = $baseDir . $file;
            }
        } */

Related- the php limit was set high.. but I don’t see that fixing this issue like the watermark.

 
Magento Community Magento Community
Magento Community
Magento Community
 
cralls
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2010-04-14
Boise, ID, USA
 

Permission issue here too :(

Proven by:

chmod -R 777 magento_directory

 
Magento Community Magento Community
Magento Community
Magento Community
 
Simenth
Jr. Member
 
Total Posts:  1
Joined:  2011-08-01
 
jalvarez - 27 March 2009 01:01 PM

Found a solution for the problem.

Magento performs a memory check, if there is not enough, it gives the placeholder image…

My word, Jalvarez. Thank you very much indeed. This bug stumped me for many hours, and it would have been many hours more had I not come across you reply.

In my case, the web server ignored the Magento memory_limit setting in .htaccess due to a global memory limit cap in cPanel’s WHM control panel. I used phpinfo() to confirm that memory_limit is now correct.

I wish there was a debug log entry for when this happens.

Regards,
Simen Thorsrud
Metronet Commerce

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top