2

I'm not sure when this started, but all thumbnail images on all products in all stores/store-views are defaulting to the placeholder image:

FrontEnd Product Page

I have checked permissions, file paths, and uploaded new images manually - original images were imported via Magmi CSV. The images are showing in the backend grid and product configuration:

Product Grid

Product Configuration

Product Configuration - Specific Store View

I've disabled my caches, flushed them, reindexed, disabled Pagespeed & Cloudflare - and still no changes.

My PHP settings for the folder this Magento store resides in are:

PHP.ini

I regularly run these commands via SSH to keep folder permissions in check:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod -R 777 media/
chmod o+w var var/.htaccess app/etc
chmod 550 mage
chmod -R o+w media

The code in my theme that renders these images is:

<?php if (count($this->getGalleryImages()) > 0): ?>
    <div class="more-views">
        <!--<h2><?php // echo $this->__('More Views') ?></h2>-->
        <ul id="more-images-slider" class="product-image-thumbs itemslider-thumbnails">
        <?php $i=0; foreach ($this->getGalleryImages() as $_image): ?>
            <?php
        if (($filterClass = $this->getGalleryFilterHelper()) && ($filterMethod = $this->getGalleryFilterMethod()) && !Mage::helper($filterClass)->$filterMethod($_product, $_image)):
        continue;
        endif;
        ?>
            <li class="item">
                <a class="thumb-link product-image" href="#" title="<?php echo $this->escapeHtml($_image->getLabel()) ?>" data-image-index="<?php echo $i; ?>">
                    <img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->constrainOnly(true)->keepAspectRatio(true)->keepFrame(false)->resize(120, 0); ?>"
                         alt="<?php echo $this->escapeHtml($_image->getLabel()) ?>" />
                </a>
            </li>
        <?php $i++; endforeach; ?>
        </ul>
    </div>
    <?php endif; ?>

The code being rendered on the site at load is:

<div class="more-views">
        <!--<h2></h2>-->
        <ul id="more-images-slider" class="product-image-thumbs itemslider-thumbnails owl-carousel owl-theme" style="opacity: 1; display: block;">
                                <div class="owl-wrapper-outer"><div class="owl-wrapper" style="width: 392px; left: 0px; display: block; transition: all 6000ms ease; transform: translate3d(0px, 0px, 0px);"><div class="owl-item" style="width: 98px;"><li class="item">
                <a class="thumb-link product-image" href="#" title="" data-image-index="0">
                    <img src="https://www.WEBSITE.com/skin/frontend/neighborhood/default/images/catalog/product/placeholder/thumbnail.jpg" alt="">
                </a>
            </li></div><div class="owl-item" style="width: 98px;"><li class="item">
                <a class="thumb-link product-image" href="#" title="alt" data-image-index="1">
                    <img src="https://www.WEBSITE.com/skin/frontend/neighborhood/default/images/catalog/product/placeholder/thumbnail.jpg" alt="alt">
                </a>
            </li></div></div></div>

                <div class="owl-controls clickable" style="display: none;"><div class="owl-buttons"><div class="owl-prev"></div><div class="owl-next"></div></div></div></ul>
    </div>

I made a backup of the current media.phtml file and uploaded an original from the theme zip, but still no change.

What other actions can I take or check to make sure these images starting showing again?

-- SMALL UPDATE --

Testing other themes/packages will show the thumbnails, so this must be something related to my theme files - now to hunt it down and find out where it is. (Using Peerforest's Neighborhood theme. Developer no longer provides support)

-- ANOTHER UPDATE --

I cleared all cookies and cache related to my site and for just one product the thumbnails were showing, now navigating to any other product they stop working again.

1
  • @sv3n - yes, I have now included that in the photos. I am careful to use a "store" column in my Magmi import sheet with a constant value of "admin" - so no store gets specific configurations.
    – Steven J
    Feb 6, 2018 at 20:01

2 Answers 2

0

Check whether your media folder have right permission. If its ok then it may be due to memory limit issue, then Magento does not rebuild the product thumbnail cache. So increase server memory limit.

1
  • My media folder is set to 777, PHP memory limit set to 6144M
    – Steven J
    Feb 6, 2018 at 20:39
0

I found the solution, but am not 100% sure of why it was the fix.

Inside of the img src My code showed:

resize(120, 0)

I started referencing the base/default and other theme package files and found that only one number was present in that area.

I changed it to:

resize(120)

And boom, the image thumbnails started showing again. I did not try with (120,0) so I can't confirm if that would work too. If anyone has any extra feedback on this, I'll gladly add it to the answer to hopefully help others in the future.

2
  • What happens if you just remove keepAspectRatio(true)?
    – sv3n
    Feb 7, 2018 at 22:51
  • Removing keepAspectRatio(true) shows no change with the original (120, 0) or updated (120) values
    – Steven J
    Feb 8, 2018 at 1:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.