First image only from photoset on indexpage, then all on permalinkpage

user2292837 picture user2292837 · Apr 30, 2013 · Viewed 9.5k times · Source

Hello - I've been playing around with tumblr photosets and currently i'm using a masonry based theme. With the photosets, i wish to just show the first image of the photoset on the index page but on the permalink page i wish for all the images of the photoset to be shown. Thanks

Answer

Marquizzo picture Marquizzo · Jan 22, 2015

The simplest and most efficient way I've found is to open a comment tag after the first photo, and close it after all photos have been added.

{block:Photoset}
    {block:Photos}
        <img src="{PhotoURL-HighRes}" class="highres">
        <!--
    {/block:Photos}
    -->
{/block:Photoset}

This will have all subsequent photos commented out. The benefit of this is that it doesn't require any CSS, or JS, plus it doesn't waste bandwidth by loading all the images in the photoset.