Jump to content

Proper way to use retina images in my own module


Guest

Recommended Posts

Hi

 

I have a module showing a couple of images and I want to use the retina version of them when applicable.

If I make the image twice the size and then use height and width in the img tag, it works fine, the image looks great on my retina device.

That will however feed the retina version of the image to all devices, also the non-retina ones. How can I make it work so that the 2x image is only served to capable devices?

I have tried to just add 2x at the end of the file name but it does not make any difference. 

I am testing with PS 1.7 and the classic theme.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...