I wondered if its possible to make the Woocommerce thumbnail images responsive. Currently, there is only one image size for the thumbnails and I would like to add the src set attribute with further image sizes. I saw that Woocommerce offers several possibilities to modify images (https://developer.woocommerce.com/docs/image-sizing-for-theme-developers/) but I don’t know if and how it’s possible to “combine” them with the responsive images functions from WordPress (https://developer.wordpress.org/apis/responsive-images/). Can anyone help me? 🙂
I used this function from Woocommerce
add_filter( ‘woocommerce_gallery_thumbnail_size’, function( $size ) {
return ‘thumbnail’;
} );
to change the image size, but that’s as far as I got.
Kiwi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.