I’m trying to set the height and width of the gallery thumbnails based on whether or not a CSS class is present on the body. My current implementation looks like this: require(['jquery', 'mage/gallery/gallery'], function($, gallery) { if ($("body").hasClass("puma")) { $('[data-gallery-role=gallery-placeholder]').on('gallery:loaded', function () { jQuery('[data-gallery-role=gallery-placeholder').data('gallery').fotorama.setOptions({thumbheight: 88, thumbwidth: 110}); }); } }); […]