0

What I'd like to do is load "normal" images on my site if a visitor is, for instance, on a monitor constrained device like a smartphone. But if they're on a big monitor with high DPI I'd like to load a high-res equivalent image. Preferably from the server-side or some way that doesn't require an extra step at load time so images still load as quickly as possible.

There are some questions about how to detect retina/high DPI devices using javascript: What is the best way to detect retina support on a device using JavaScript? or on the server: detect retina (HD) display on the server side but I want to apply that info to load the appropriate image client side.

rogerdpack
  • 62,887
  • 36
  • 269
  • 388

1 Answers1

0

Retina.js may be helpful, if you're looking for client side solutions.

http://imulus.github.io/retinajs/

Josh
  • 3,872
  • 1
  • 12
  • 13