Page 1 of 1

Using alongside with Webp images

Posted: Tue Jul 12, 2022 4:24 pm
by norman
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:

Code: Select all

		id="im-<Actinic:Variable Name="EncodedProductAnchor" />"
Then in file multiproductimagesupport.js look for the line:

Code: Select all

function mpi_imageswitch(swapimage, newimage){
And add a line below it:

Code: Select all

	swapimage.parent('picture').find('source').remove();
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.