Get All Images Except ‘Base Image’ and ‘Small Image’ in Magento

product-images

I would like to output all Images except 'base image' and 'small image' for an image Slider. Right now this code below outputs all Images:

    <?php
    $_product = $this->getProduct();
    $_helper = $this->helper('catalog/output');
?>
<?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>

    <div class="row slider clearfix">
        <div class="column full slide ratio4_3">

        <ul class="bxslider product">
            <?php foreach ($this->getGalleryImages() as $_image): ?>
                <li>
                  <div class="sliderContent">
                  </div>
                  <img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile()); ?>" class="sliderImage" alt="<?php echo $this->escapeHtml($_image->getLabel()) ?>" />
                </li>
            <?php endforeach; ?>
        </ul>

      </div>
    </div>

<?php endif; ?>

What is the best way to display all Images not tagged with anything?

Best Answer

based on the comments....

You can go to the backend and check the "Exclude" checkbox for the images you don't want shown in the media gallery.

All the images that have this "exclude" checkbox checked are ignored by the getGalleryImages method.

Related Topic