I have had this same discussion way to many times with the designers that I work wtih. ??
Realize that catacaustic’s solution would require you to specify an image that has not already been cropped by WP
Not quite. You are right that the image would be larger than required, but you can still use a cropped version of the image. If you’re concerned about loading itmes you can specify multiple images at different breakpoints for different sized screens.
You’ll also need a more specific selector than “product-image”, one that is unique to each image.
No, you don’t. That class specifies the size of the element and how the background it displayed. The actual background image is set inline on each element, so there’s no need for anything more specific.
You will get erratic behavior with scaled images if there is a mix of landscape and portrait orientations because responsive CSS presumes one or the other.
That’s what my solution works around. What I’m offering is a way to have images display all at the same size regardless of orientation, pixel size, etc. Cropping or not cropping images always has the chance of inconsistancy. I know that first hand from images set to crop at the same size, but they don’t because the client has uploaded ones that are smaller than the cropped dimensions, so the default ‘full’ size image is shown, mixing up sizes on the page.
If you can guarantee that every image uploaded will always be larger than the highest cropped size, then use tags and cropped images. If you can’t (and most clients don;t understand this) then what I’ve suggested is the only way to be 100% sure that every image is displayed in the same size everywhere.