0

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

0

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
           }
        }
    }
}

Ref: https://stackoverflow.com/a/42556073/4274144

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.