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 %}
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 %}
To display the image, you'll at least need to use an <img>
tag:
<img src="{{ p.thumbnail_image.url }}" alt="{{ p.name }}">
Just got an answer to the problem:
{% for p in item.images.all|slice:"4" %}