简体   繁体   中英

Magento product upload images are not appearing

I'm uploading products to my Magento store but products are not being displayed.

I can upload the image using the admin area and when managing my products I can see the images there, but once I go to the front end I just get the Magento logo where the product image should appear.

This has been happening since my server migration so I'm not sure if its related or not.

There are many things that could be causing this issue, but here's a few things for you to look into:

  1. On the Product Information page in your admin backend, under 'Images', make sure the radio buttons have an image selected for 'Base Image', 'Small Image', 'Thumbnail', and that they aren't 'Excluded'

  2. Make sure the product images exist under /media/catalog/product/ (relative to your document root)

  3. Make sure the /media directory is in your Apache web server's group (usually 'www-data' or 'httpd'). Magento also needs to be able to write to this directory, so you can run this command to set those permissions:

     sudo chmod -R 775 /path/to/magento/media 
  4. In System->Configuration->General->Web, make sure "Base Media URL" is correct under both "Secure" and "Unsecure"

只需将.htaccess重命名为Magento根目录中的.htaccess-old内部媒体目录。

You need to do the following to get this right:

  1. Recursively change permissions -r or via ftp set media folder to 777
  2. Make sure your server has curl, image gd enabled and refresh magento cache

Just adding more information to help: if your SELINUX is enabled, you need additional setup. Here you can find some information http://www.magentocommerce.com/knowledge-base/entry/ce18-and-ee113-installing#install-prereq-selinux

试试这段代码: - 你可能不会在下面添加: -

$_product=Mage::getModel("catalog/product")->load($_product->getId());

Even though late, Hope it will help for someone

If its still not showing even after all the above tweaks. Try to reduce the size of the image to few KBs and try. It worked for Me.:)

For me the issue was php7.0-gd extension. Once I installed it image appears without a problem.

sudo apt-get install php7.0-gd

sudo service apache2 restart

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM