cancel
Showing results for 
Search instead for 
Did you mean: 

What now?

Highlighted

What now?

Hi,

 

I need to add ID attribute to images on a product page, like this:

<img id="" href=

I can do this if I modify 

lib/web/fotorama/fotorama.js

How can I do this the right way?

I created

<My Module>/<Name>/web/js/test.js

and in require-config.js I added this:

var config = {    map: {
        '*': {            myTest: 'js/test'
        }
    }
};

And file test.js I have this:

 

define([
    'jquery',
    'jquery/ui',
    'catalogGallery'
], function($){

   
});

What now?

 

I searched this forum and stackexchange for the similar topics but few I found, like this one:

http://magento.stackexchange.com/questions/105219/magento-2-override-gallery-html-file-from-vendor-magento-magento2-base-lib-web

was not answered.

1 REPLY 1
Highlighted

Re: What now?

If you want to override `fotorama.js` file you can copy it to

app/design/frontend/{Package}/{theme}/web/fotorama/fotorama.js

After that You need to run:

php bin/magento setup:static-content:deploy

If found useful, please Accept as Solution & give Kudos