Skip to content
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

ICO files being served as JPEG #723

Closed
alsotop opened this issue May 11, 2016 · 8 comments
Closed

ICO files being served as JPEG #723

alsotop opened this issue May 11, 2016 · 8 comments

Comments

@alsotop
Copy link

alsotop commented May 11, 2016

Thumbor request URL

http://127.0.0.1:8000/unsafe/1366/208346.ico

Expected behaviour

ICO file being served as image/x-icon

Actual behaviour

ICO being converted to JPEG, which means the favicon is served without transparency. Potentially we may have been seeing this behaviour with a previous version (pre version 6) where it would ignore any
conversions and just serve it as it was.

Operating system

Amazon Linux
Thumbor 6.0.0

Your thumbor.conf

thumbor.conf

@guilhermef
Copy link
Member

I think we've never tested with .ico

@nicolasdanelon
Copy link

so.. any news whit this issue ?

@orafaelfragoso
Copy link

@alsotop We've been investigating the .ico support and we are trying to understand your necessity. If it's something helpful for other users, we would like to know more. Please clarify.

Also, browsers can use .png for favicons and they treat .ico as .png. Correct me if I'm wrong.

Looking forward to hear from you.

@alsotop
Copy link
Author

alsotop commented Jul 14, 2017

Hi @rafaelfragosom to be honest we worked around the issue by serving ICO files directly rather than through Thumbor. Our original aim was to have our entire image database served uploaded to S3, served through multiple Thumbor instances behind Nginx, behind CloudFront. We've changed the nginx config to see if the request is for an ico file then to proxy the ICO file directly from our S3 bucket.

For backwards compatibility, we were still using ICO files for Favicons, particularly I believe IE11 is the first version of Internet Explorer that supports PNG files as favicons (see here https://stackoverflow.com/questions/16943609/which-versions-of-ie-support-png-favicons ). If the demand is so small, and it's easy enough to work around, and old browser versions are finally dropping off, it looks like it will probably not be worth the time in the long run.

Thanks for getting back to me.

@heynemann
Copy link
Member

If you have any further questions on this issue, please reopen it.

@DoHe
Copy link

DoHe commented Jul 27, 2018

@heynemann we are encountering the same problem. We want to embed other site's favicons, e.g. https://cdn.ecosia.org/assets/images/ico/favicon.ico and as they can vary in size we'd love to proxy them through thumbor. As a lot of favicons contain transparency, the fact that they are returned as jpeg is really a problem for us.
Could it be as easy as adding a mapping from ico to png here? If so I'm more than happy to provide a PR for this.

@heynemann
Copy link
Member

By using format(png) it works fine...

http://localhost:8888/unsafe/300x300/filters:format(png)/https://cdn.ecosia.org/assets/images/ico/favicon.ico

Any chance you can use that?

@DoHe
Copy link

DoHe commented Jul 31, 2018

@heynemann thanks a lot I wasn't even aware that existed! That did indeed solve my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants