New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retina displays - 404 error when there is no @2x image #231

Open
pixel-industry opened this Issue Feb 29, 2016 · 10 comments

Comments

Projects
None yet
8 participants
@pixel-industry

pixel-industry commented Feb 29, 2016

Hi,

we are facing a problem with retina.js on retina screens. We have premium template that has no retina images, but we use the script because of our buyers, so they don't have to include it by themselves.

The problem is that template doesn't have retina images, only regular ones. On MAc, retina display, the normal image apears, but script is generating 404 errors in console (as it can't find @2x images). Can you help us to solve this issue. I think that the script should just ignore if there is no retina images, not showing 404 error in console. Here is the link to template in question: http://www.pixel-industry.com/html/trucking/

Thank you in advance.

Kind regards,
Andrijana

@lucasff

This comment has been minimized.

Show comment
Hide comment
@lucasff

lucasff May 10, 2016

This is not a bug, it is a feature. On HTTP methods, even OPTIONS, HEAD or GET they obviously return 404 Not Found if the file is not found. Retina.js performs this to check if the file exists to be replaced... So, if you want, you can add data-no-retina to your images tags to avoid requesting the retina version of them. It is in the docs.

lucasff commented May 10, 2016

This is not a bug, it is a feature. On HTTP methods, even OPTIONS, HEAD or GET they obviously return 404 Not Found if the file is not found. Retina.js performs this to check if the file exists to be replaced... So, if you want, you can add data-no-retina to your images tags to avoid requesting the retina version of them. It is in the docs.

@djalexa

This comment has been minimized.

Show comment
Hide comment
@djalexa

djalexa May 11, 2016

Wouldn't it be easier to add a class for images that has hi-res copy and avoid tons of 404 errors that are really bad...
http://www.firmthemes.com/jquery/how-to-avoid-retina-js-404-errors/

djalexa commented May 11, 2016

Wouldn't it be easier to add a class for images that has hi-res copy and avoid tons of 404 errors that are really bad...
http://www.firmthemes.com/jquery/how-to-avoid-retina-js-404-errors/

@clemensg

This comment has been minimized.

Show comment
Hide comment
@clemensg

clemensg May 11, 2016

I agree, but this breaks backwards-compatibility. Maybe for 2.0 @strues ?

clemensg commented May 11, 2016

I agree, but this breaks backwards-compatibility. Maybe for 2.0 @strues ?

@strues

This comment has been minimized.

Show comment
Hide comment
@strues

strues Jun 13, 2016

Owner

This is fixed in version 2.0 of Retina.js. We'll be releasing it officially in the next couple of days.

Owner

strues commented Jun 13, 2016

This is fixed in version 2.0 of Retina.js. We'll be releasing it officially in the next couple of days.

@strues strues added the legacy label Jun 21, 2016

@Smitty17

This comment has been minimized.

Show comment
Hide comment
@Smitty17

Smitty17 Mar 30, 2017

Has this been fixed? I am using v2.1 and still get 404 errors in my console.

Smitty17 commented Mar 30, 2017

Has this been fixed? I am using v2.1 and still get 404 errors in my console.

@kleuter

This comment has been minimized.

Show comment
Hide comment
@kleuter

kleuter Mar 31, 2017

The project seems to be abandoned

kleuter commented Mar 31, 2017

The project seems to be abandoned

@strues

This comment has been minimized.

Show comment
Hide comment
@strues

strues Mar 31, 2017

Owner

Sorry guys I lost the ability to merge code after the company which put out RetinaJS went under.

Owner

strues commented Mar 31, 2017

Sorry guys I lost the ability to merge code after the company which put out RetinaJS went under.

@Smitty17

This comment has been minimized.

Show comment
Hide comment
@Smitty17

Smitty17 Mar 31, 2017

Thanks for the update. I'll see if I can fix it. Cheers.

Smitty17 commented Mar 31, 2017

Thanks for the update. I'll see if I can fix it. Cheers.

@strues

This comment has been minimized.

Show comment
Hide comment
@strues

strues Mar 31, 2017

Owner

No problem. I'll see what I can do about getting write permission

Owner

strues commented Mar 31, 2017

No problem. I'll see what I can do about getting write permission

@terzom

This comment has been minimized.

Show comment
Hide comment
@terzom

terzom Oct 15, 2018

Years later, is this code available for me to implement myself?

terzom commented Oct 15, 2018

Years later, is this code available for me to implement myself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment