Site logo

Archived topic

Retina image html

12 replies · Started by Shawn on November 13, 2018

Viewing posts 1–13 of 13

I want to add this html code to my site for retina images:
<img src="normal-image.jpg" srcset="normal-image.jpg 1x, normal-image@2x.jpg 2x" alt="" />

Where does it go? This is probably a dumb question but I don't know what I don't know.

Thanks.

The html code isn't displaying in my submission above for some reason.

Hi there,

if you can edit your original topic, highlight your HTML and click the code button in the editor.

Great, thanks David.

If you're looking to use Retina images throughout the content of the site i would recommend using this plugin:

https://wordpress.org/plugins/wp-retina-2x/

It simplifies the whole process and will save you editing the html for each of your images

I've heard this plugin isn't compatible with Elementor, which is what I'm using.

Hmmm... i haven't tested it with Elementor, i am not sure why it wouldn't work ( apart from background images ) as it just adds a srcset attribute for the image. Have you spoken with Elementor about this?

Yes, Elementor confirmed the compatibility issue and recommended I contact the developer. I did but didn't receive a response.

And they offered no other advice on how to use Retina images with their product?
Problem we have is Elementor prints the HTML so if they are leaving behind the necessary attributes we cant really assist with fixing that.

No other advice was offered.

I am afraid there is not much we can do, it would require some serious custom development to add the necessary sources to Elementors markup. Maybe this is why they haven't done it or they don't feel there is a need for it. I checked their Github and it was only raised once as an issue. So not much demand has been generated.

Thanks for your help David.

You're welcome, sorry we couldn't provide a solution.

This archived topic is closed to new replies.