Thumbnail is not working,

Tried to create thumbnails for my gallery, pages/, but i coudn’t make it work, is there anything wrong with my code ?
{% for portfolio in page.header.images %}

  • {{[portfolio.image].thumbnail(‘default’).display(‘thumbnail’).html(‘Sample Image’) }}

    Title #0


  • {% endfor %}

    Did you provide a thumbnail file in the format: my_original.jpg.thumb.jpg assuming the regular image is called my_original.jpg ?

    Then you would access this via:

    {{['my_original.jpg'].thumbnail.html }}

    Also you don’t actually need to provide a thumbnail, you can create one dynamically with the media functions:

    {{['my_original.jpg'].cropResize(100,100).html }}
    1 Like

    i thought[portfolio.image].thumbnail(‘default’).display(‘thumbnail’).html(‘Sample Image’) }}
    is sufficient to make a thumbnail, (didn’t find any documentation) and thanks, i followed your second method and it worked.

    1 Like

    How to make all the cropped images same size, what if some images has different aspect ratio ?

    Documentation for all the media methods is here. You might want to look at cropZoom