Situation:
In my store when a product has more then one image, the (Product)page shows the images in a jQuery slideshow. The code for this slider is created from the thumbnails in media.phtml with the following snippet:
<?php if (count($this->getGalleryImages()) > 0): ?>
<div class="more-views">
<ul id="productSlider">
<?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>
<a class="thumb-link" rel="media" href="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(800); ?>" 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())->resize(265); ?>"
width="265" height="265" alt="<?php echo $this->escapeHtml($_image->getLabel()) ?>" />
</a>
</li>
<?php $i++; endforeach; ?>
</ul>
</div>
<?php endif; ?>
Problem:
The thumbnails are presented in reverse order, resulting in the main image always being displayed last (and out of sight).
Question:
What would I need to change to reverse the order in the thumbnail generation so the "main" image gets displayed first?