category oscprofessionals - Blogs - Fotorama (Product) Gallery Alternative to Improve the LCP Score in Magento 2

Fotorama (Product) Gallery Alternative to Improve the LCP Score in Magento 2

1. Firstly You’ll Check your Fotorama Script in the source code and then find the script of fotorama as shown in the Image.

Starts with (Keyword) – “[data-gallery-role=gallery-placeholder]”
script-of-fotorama

2. After that you’ll find the phtml file where this script will be called.
Path of gallery.phtml file

App > Design > Frontend > Vendor > theme > Magento_Catalog > templates > product > view > gallery.phtml
After that you’ll find the phtml file where this script will be called.
Path of gallery.phtml file –
App > Design > Frontend > Vendor > theme > Magento_Catalog > templates > product > view > gallery.phtml
After the finding script comment/remove it down old Script in phtml File and then Addon this alternate Script –
NOTE : Make sure all configuration,
Eg;{“mixins”:[“magnifier/magnify”], “magnifierOpts”: ]} will vary according to each site.

Example

gallery.phtml-file
4. After that Re-Check you site & source code also This is the Dynamic Script, As show in the code Below
Re-Check-site-code

Latest Posts

One Comment

  1. bottega veneta small roma bag October 3, 2023 at 3:19 pm

    Ι ѡas abⅼe to find ցood advice from your content.

Leave A Comment