Main Products images on produt page are stretched. Could someone help?

Main Products images on produt page are stretched. Could someone help?

Fer0x
Visitor
1 0 0

I've installed some plugin and now the first image of each product page are deformed. But when you click the image, it show the original size (square). Does someone know what is happening and how I can solve it? Please explain in language for a person that understand nothing about coding. Product page example: https://sexshoperoticos.com.br/products/plug-**bleep**-vibratorio-controlado-por-celular

Replies 2 (2)

theycallmemakka
Shopify Partner
1813 439 474

Hi @Fer0x 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above tag </body>

{% if product %}
<script>
document.addEventListener('DOMContentLoaded', () => {
  const sliderFix = setInterval(() => {
    const slickSlider = document.querySelector('.slick-slider');
    if (slickSlider && slickSlider.classList.contains('slick-initialized')) {
      const firstImage = document.querySelector('.productView-nav .productView-image:nth-of-type(1) img');
      const secondImage = document.querySelector('.productView-nav .productView-image:nth-of-type(2) img');
      if (firstImage && secondImage) {
        firstImage.setAttribute('sizes', secondImage.getAttribute('sizes'));
      }
      clearInterval(sliderFix);
    }
  }, 100);
});
</script>
{% endif %}

 

If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

 

Best Regards,
Makka

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

Dan-From-Ryviu
Shopify Partner
11966 2341 2520

Hi @Fer0x 

This is your theme issue, and you can solve it by following this instruction 

https://halothemes.net/blogs/shopify/fixing-ella-image-error

- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.