Using alongside with Webp images
Posted: Tue Jul 12, 2022 4:24 pm
Multi Product Images needs some tweaks to work alongside webp images. In your webp product image layout make sure the <img...> tag has an attribute:
Then in file multiproductimagesupport.js look for the line:
And add a line below it:
This will remove all the source tags from a product image when an additional image is selected, thus allowing the <img...> tag to show the alternate image.
Code: Select all
id="im-<Actinic:Variable Name="EncodedProductAnchor" />"
Code: Select all
function mpi_imageswitch(swapimage, newimage){
Code: Select all
swapimage.parent('picture').find('source').remove();