Accessing images of products in a collection

New Member
1 0 0

I want to access only the images of products in a specific 'best sellers' collection. I used the following code:

{% assign collection = collections['Best-Sellers'] %}

{% for product in collection.products %}
<a href="{{product.url}}">
<img src="{{product.image}}">
{% endfor %}


I'm not entirely sure if I've written something wrong? Or how come this code isn't working. For example if I substituted the img with simply {{product.title}} I was able to access everything just fine. Can someone help me with this?