I have this in my view.xml:
<image id="new_products_content_widget_grid" type="small_image"> <width>474</width> <height>267</height> <aspect_ratio>true</aspect_ratio> <frame>false</frame> </image> And this in my template:
<?php echo $block->getImage($_product, $image)->toHtml();?> Where $_product comes from $_productCollection = $block->getLoadedProductCollection();
The uploaded images are square, but the design wants them to be output as a rectangle. With XML above, I get squares with vertical letterboxing.
How do I go about having the image enlarged to fill the entire rectangle, by cropping top and bottom off the image?
