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

Wrong size for ico pictures #154

Closed
ScriptArtist opened this issue Sep 10, 2018 · 10 comments
Closed

Wrong size for ico pictures #154

ScriptArtist opened this issue Sep 10, 2018 · 10 comments
Assignees
Labels
question Further information is requested

Comments

@ScriptArtist
Copy link

As example picture 32x32:
https://accounts.google.com/favicon.ico

If open thought images.weserv.nl, picture will change size to 16x16px
https://images.weserv.nl/?url=https://accounts.google.com/favicon.ico

@andrieslouw andrieslouw self-assigned this Sep 10, 2018
@andrieslouw andrieslouw added the triage This issue is being investigated label Sep 10, 2018
@wei
Copy link

wei commented Sep 10, 2018

@andrieslouw
Copy link
Member

That favicon is a so-called mutiresolution favicon, see https://en.wikipedia.org/wiki/Favicon.

By default, we take the first occuring favicon, which is the smallest, this also happens here: https://images.weserv.nl/?url=images.weserv.nl/favicon.ico

@andrieslouw andrieslouw added question Further information is requested and removed triage This issue is being investigated labels Sep 10, 2018
@andrieslouw
Copy link
Member

And indeed, please see https://images.weserv.nl/#page on how to get the bigger sizes.

@ScriptArtist
Copy link
Author

Thanks!

But how to get biggest resolution icon? (or the same as in the browser response https://www.google.com/favicon.ico)

Only way i see now is brute force pages and check resolution of icons.

@andrieslouw
Copy link
Member

Need to check our implementation, but I think it needs to be added..
@kleisauke: could this be extended into something to get the last page/biggest resolution?

@juantxo-g
Copy link

juantxo-g commented Oct 19, 2018

I also hava an issue with a favicon file.

My url: https://images.weserv.nl/?w=16&h=16&errorredirect=https://st1.okgift.eu/v1/images/def-favicon.jpg&url=www.pullandbear.com%2Ffavicon.ico

also with:

https://images.weserv.nl/?w=16&h=16&errorredirect=https://st1.okgift.eu/v1/images/def-favicon.jpg&url=https%3A%2F%2Fwww.pullandbear.com%2Ffavicon.ico

Url https://www.pullandbear.com/favicon.ico works ok.

I get a 404 status code and a text: "Error 404: Server couldn't parse the ?url= that you were looking for, error it got: Invalid or unsupported image format. Is it a valid image?"

It is supposed that when using errorredirect parameter and an error occurs, the other image was returned, not an error code and a text.

Am I right?

@kleisauke
Copy link
Member

Regarding this issue; perhaps we should add a special value to the &page= parameter (for e.g. &page=-1 and &page=-2) to get the biggest/smallest page, because I think that a stand-alone parameter will cause confusion.

@juantxo-g I forgot to mention; the &errorredirect= parameter works now for all errors (include API errors) with ebd66a5.

@andrieslouw
Copy link
Member

@juantxo-g : Sorry, this took us a while to figure out, but it should be solved now! ImageMagick had some strange issues since updating CentOS to the latest version, fixed it by restarting all services & reloading all configs on our servers.

@andrieslouw
Copy link
Member

For future updates, please see: #170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

5 participants