Magento – How to change max-width in the product gallery in Magento 2

fotorama-slidergallery-imagemagento2product

How to change max-width in the product gallery in Magento 2 by using below code.

<div class="fotorama__stage__shaft fotorama__grab" tabindex="0" data-gallery-role="stage-shaft" style="width: 684px; margin-left: 0px; transition-duration: 0ms; transform: translate3d(0px, 0px, 0px); max-width: 572px;"

Any advice?

Best Answer

Look at this file:

vendor/magento/magento2ce/lib/web/fotorama/fotorama.js

Line: 1900

Or find this line:

$stageShaft.css('max-width', $wrap.width() - padding);

This is the file that builds the gallery on product page.