0

I am using the amely theme and overridden the code, The images which I display on thumbnail somehow the first images come at the end.

I am not able to figure out why this is happening.

<div id="vertical-thumbnail-wrapper">
    <div id="vertical-thumbnail" class="vertical-thumbnail">
        <?php $i = 0; foreach($galleryImages as $image): ?>
            <?php $lbImage = $image->getLabel() ? $image->getLabel() : $image->getLabelDefault(); ?>
            <div class="item-thumb<?php if($i == 0): ?> active<?php endif ?>" data-owl="<?php echo $i ?>">
                <img class="img-fluid" src="<?php echo $image->getSmallImageUrl(); ?>" alt="<?php echo $productHelper->getAltImageText($this->getProduct()) ?>"/>
                <?php if($image->getMediaType() == 'external-video'): ?>
                    <div class="popup-video-thumb"><span class="ti-video-camera"></span></div>
                <?php endif ?>
            </div>
            <?php $i++; ?>
        <?php endforeach ?>
    </div>
</div>

enter image description here

The marked image should be at first and even the url tells that it is the first image.

src="/media/catalog/product/2/6/2627226574012237626-1.jpg?width=120&height=160&quality=85&fit=bounds"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.