Search code examples
djangotemplatesimage-manipulationimagekitdjango-imagekit

Display thumbnails in an object list using Django and django-imagekit


How do I display thumbnails for my item list....also is it possible to display just a specific thumbnail or a random thumbnail? So far I have this in my template:

{% for p in item.images.all %}
   {{ p.get_thumbnail.url }}
{% endfor %}

Solution

  • Just got an answer to the problem:

    {% for p in item.images.all|slice:"4" %}