I've made a custom Magento 2 Theme, updated the view.xml with all my image dimensions, and resized the catalog images through the cli.
However, the Fotorama image gallery on product pages is not resizing, it isnt displaying the right image size and when I resize the browser window < 768px the image width and height both become 2px.
Does anyone know what my problem might be?
1 Answer 1
Try edit the following file: app/design/vendor/Magento_Catalog/templates/product/view/gallery.phtml
Here you can add your options
<script type="text/x-magento-init">
{
"[data-gallery-role=gallery-placeholder]": {
"mage/gallery/gallery": {
"mixins":["magnifier/magnify"],
"magnifierOpts": <?php /* @escapeNotVerified */ echo $block->getMagnifier(); ?>,
"data": <?php /* @escapeNotVerified */ echo $block->getGalleryImagesJson(); ?>,
"options": {
"maxheight": "700", // Add your value here
}
}
}
}
Explore related questions
See similar questions with these tags.