getProduct images with pThumb

Hi there,

I need to optimise my product images, but I cannot work out how to incorporate pThumb with the get_product snippet?

[[commerce.get_product? &product=`[[+tv.product]]` &field=`image`]]

I’ve tried placing it within the snippet call, but it doesn’t do anything.

Any ideas?

Thanks
Andy

Hi @andyjones

Since that will be outputting the value of the comProduct::image, you can wrap that in the pthumb snippet call.

I just tried this which worked:

[[pthumb? 
    &input=`[[commerce.get_product? &product=`[[+tv.product]]` &field=`image`]]` 
    &options=`&w=200&h=480&zc=0`
]]
1 Like

Aha - I hadn’t thought fusing pthumb in that way - I’m used to using it as an output modifier only.
This works perfectly thank you!