Magento_Catalog/templates/product/list.phtml
<?php //$image = 'category_page_grid' or 'category_page_list'; $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(400)->getUrl(); ?> <img src="<?php echo $productImage; ?>" />