3 ms·
We have a service similar to imgix (thumbr.it). The way we serve retina images is that you add @2x to the name of the images with JS, and when we see the image
by e98cuenc 13y ago
We have a service similar to imgix (thumbr.it). The way we serve retina images is that you add @2x to the name of the images with JS, and when we see the image name ends with @2x we serve double the size you requested (see http://thumbr.it/api/documentation/#retina http://thumbr.it/api/documentation/#retina).
I guess the imgix guys do something similar.
Serving different images with exactly the same URL is tricky because it will confuse the cache.
- kaffeinecoma 13y agoStupid question: are you just doubling every pixel of a non-retina source for the @2x images? Does that really provide any extra clarity on a Retina display (beyond setting the proper size of the image?) Or are you actually starting with an @2x image and halving it for non-2x default?
- e98cuenc 13y agoThe retina modifier is only useful when you request a smaller thumbnail than the original. So your original may be 1000x1000px, you use a 128x128 thumbnail on your regular (non-retina) site, and you serve 256x256 thumbnail to your retina users. If your original image is small then there is nothing to do.