Skip to content

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

Closed
paoloandrea opened this Issue May 2, 2012 · 5 comments

5 participants

@paoloandrea

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.

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

There are a solution?

Thank's

@caseyohara

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

@paoloandrea

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

@zackdever

I've noticed this happens when using hosting such as http://staticloud.com/, 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:
http://ciclismo.staticloud.com/kjskldjld

$ curl -I http://ciclismo.staticloud.com/kjskldjld
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; Domain=.staticloud.com; expires=Thu, 22-Aug-2013 17:29:59 GMT; Max-Age=31536000; Path=/
Server: gunicorn/0.12.0
Vary: Cookie
Set-Cookie: sessionid=a2cea44f070eebdf9498e4bee053c87e; Domain=.staticloud.com; 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
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.

@coyote240

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.