4

I have created a product and assigned an image to it but on fronend it still showing the demo magento image not mine updated image.

List.phtml Image part:

 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>" class="product-image">
 <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($size['width'], $size['height']) ?>" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" class="img-responsive"/>
 <?php if(basename($_product->getData('image')) != basename($_product->getData('small_image'))): ?>
 <img src="<?php echo $this->helper('catalog/image')->init($_product, 'image')->resize($size['width'], $size['height']) ?>" 
 alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" class="img-responsive img-two"/>
 <?php endif ?>
 </a>

Admin panel product image: enter image description here

Front end not showing actual image but the dummy magento image: enter image description here

Indexes are updated cache is cleared: enter image description here

asked Dec 7, 2016 at 16:18
10
  • try reindexing once from system > index management...... Commented Dec 7, 2016 at 16:32
  • I tried all these solutions.. not working @Baby in Magento Commented Dec 7, 2016 at 16:34
  • did you checked in product view page ? clearing cache, private window , uploading image to new products? Commented Dec 7, 2016 at 17:11
  • yes checked there , created three products but no one is showing the image at all either on category page or details pages @Baby in Magento Commented Dec 7, 2016 at 17:48
  • Can you show your list.phtml? At least image part? Commented Dec 7, 2016 at 22:10

2 Answers 2

2

In my case i have just fixed it by adding echo to my image src so it working now:

<?php echo $this->helper('catalog/image')->init($_product, 'image'); ?>
answered Dec 9, 2016 at 16:10
0

Try reducing the size of the image and upload. It is applicable for catalogue section as well.

answered Jul 21, 2017 at 8:25
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.