TWIG: Crop Image of Collection

I have a page collection that provides an image in the collection header (has been uploaded through the admin panel directly to the page). I want to cropResize() this image but I do not get it to work. My code:

{% for product in categ.collection %}
{% set prdimage =[product.header.image] %}
{% endfor %}

returns nothing. any ideas?

Looks like there are missing the single quotes around product.header.image

{% set prdimage =['product.header.image'] %}

Also, try dumping those variables to the debug bar to check if product is actually something, and same for and prdimage

sorry for my late reply. wsanter’s answer FTW :slight_smile: