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?

asked Oct 10, 2018 at 12:22

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

answered Oct 10, 2018 at 12:43

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.