2

I want to use an animated GIF image in my Magento PWA Studio project, but when the image is rendering in the browser a suffix code is being added to it like this

The image has been added by the page-builder and is being directly fetched as content and all images are by default optimized. https://pwa.local.com:2000/media/wysiwyg/gifanimation_image_400x400px_1.gif?auto=webp&format=pjpg&quality=85

Since this auto=webp&format=pjpg&quality=85 is getting added at the end so GIF is not animating.

Can we somehow remove this from GIF image? so this is no longer optimized and keeps its animation property intact.

Any help will be appreciated. Thanks

1 Answer 1

0

You can override the optimization feature by overriding the

node_modules/@magento/peregrine/lib/util/makeUrl.js

in your theme/package by specifying it in

componentOverrideMapping.js

and stop the optimization condition by checking if the incoming file format is gif inside the makeURL.js file

if(getFileType === "gif"){
//do nothing
}
1
  • 1
    Thanks, it solved the issue, @Aditya Yadav. Sep 5, 2022 at 4:53

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.