Skip to content

Don't load default image, only load @2x #21

paoloandrea opened this Issue May 2, 2012 · 5 comments

5 participants


Hi, and thank you for your great job.

I've a problem.
I've insert the retina script in my web page.
When in my webpages there are the @2x image on the same folder of the standard image there aren't problem and the script work very well.
But if i don't have the image (@2x) on folder, the script don't show the normal image.

FOLDER > image.png + image@2x.png (WORKS)
FOLDER > image.png (Don't show the image standard )

There are a solution?



@paoloandrea Do you have a link or example code of where this is happening?


i've simulated the error.
You can see it on
and download the zip full code at
Thank you for help me.


I've noticed this happens when using hosting such as, because they do not return a proper 404 response when a file isn't found. They instead just return a page indicating that the page could not be found, but the response is 200.

Example '404' page:

$ curl -I
HTTP/1.1 200 OK
Date: Wed, 22 Aug 2012 17:29:59 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Set-Cookie: sessionid=92035ab79247950b011a4084217e550b;; expires=Thu, 22-Aug-2013 17:29:59 GMT; Max-Age=31536000; Path=/
Server: gunicorn/0.12.0
Vary: Cookie
Set-Cookie: sessionid=a2cea44f070eebdf9498e4bee053c87e;; expires=Thu, 22-Aug-2013 17:29:59 GMT; Max-Age=31536000; Path=/
Cache-Control: no-cache

Because it returns a 200, retinajs thinks the image is actually there, and tries to load it in.

chinwag commented Aug 25, 2013

After reviewing the example created by @paoloandrea, I think that my problem is linked as I use TimThumb to dynamically generate the required images, i.e. no retina images are loaded and no normal resolution images either.


This issue does seem to be caused by odd hosting behavior. Closing.

@coyote240 coyote240 closed this Apr 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.