Switch from data-mainimage to src for Lazyload

Charles_Nuytten
New Member
5 0 0

I everyone 🙂

I'm using WEGLOT for my translation, and when I want to translate my medias in www.mycasefc.com, Weglot ask me this: 

it seems that Weglot isn't able to detect this image due to the lazyloading system.
Weglot is able to detect an image URL when it's displayed thanks to an src data attribute.

However, as you can notice attached, the image is generated with a data-mainimage data attribute.

You'll need to replace the "data-mainimage" data-attribute with "src" and you should then be able to translate thoses images.

 

I'm absolutely not familiar with code and really need some help please.

 

maybe my joined file can help

 

 Capture d’écran 2021-07-16 à 14.08.32.png

Replies 3 (3)

Michal17
Shopify Partner
835 73 175

Hi @Charles_Nuytten 

Hope you're having a great day!

You should contact Weglot Support Team at support@weglot.com for more effective help.

If you found this comment useful, hit the 'Like' and 'Accepted solution' buttons.

Charles_Nuytten
New Member
5 0 0

Hello,

Weglot asked me to find someone for help because it doesn't concern them since it depends directly on the theme.

Charles_Nuytten
New Member
5 0 0

Here's more information from weblog:

 

"Since the concern comes from the fact that the image is generated via a custom data-attribute. I had just advised to change this data-attribute by a native HTML element."

 

Can you help me please to fix this ?