Magento – Serve resources from a consistent URL – 2 images URL for single product, same image

magento2product-images

I have one image for all three small, base and thumnail.

However, when I am uploading a product , and selecting three options, magento automatically takes this as 2 image URLS in 2 different folder for a single product upload.

Can anyone advise how to assign single image URL in magento for a product.

Below is the URLs for single product upload
For ex: http://www.akkoda.com/media/catalog/product/cache/1/small_image/300x/17f82f742ffe127f42dca9de82fb58b1/A/K/xAK102.jpg.pagespeed.ic.a5_c7F3nFd.jpg

http://www.akkoda.com/media/catalog/product/cache/1/thumbnail/300x/17f82f742ffe127f42dca9de82fb58b1/A/K/xAK102.jpg.pagespeed.ic.a5_c7F3nFd.jpg

Best Answer

The problem appears when you have a product with only one image assigned to all placeholders (thumbnail, small image, base image) and you call two of that images to switch when hovering with the mouse. An easy fix would be to have at least two different images per product assigned to different placeholders. The not so easy fix is to edit the phtml files that load the product images in catalog view, determine if the product has just one image and then load only once if that's the case.

Related Topic