twentyhq / favicon

100% free and open-source favicon provider
https://github.com/twentyhq/twenty
MIT License
238 stars 19 forks source link

TWNTY-3219 - `twenty-favicon` not loading favicons for some sites #27

Closed gitstart-app[bot] closed 7 months ago

gitstart-app[bot] commented 8 months ago

Description

We encountered a problem displaying icons for websites with the .ico extension, resulting in a broken image being shown to users. This issue arose because ico-to-png was not parsing these files into a format compatible with Sharp. In response, we now utilize Sharp for the initial conversion to PNG.

Refs

https://github.com/twentyhq/twenty/issues/3219

Demo

Before

Twenty_com 07 55 Feb 01

After

Twenty com

Fixes https://github.com/twentyhq/twenty/issues/3219

gitstart-twenty commented 8 months ago

Hey @FelixMalfait, Please check this out

charlesBochet commented 8 months ago

@gitstart-twenty I remember that some format were not supported by sharp. If this works, this is great! But I'll double check it today that all previously supported format are still supported with this change

gitstart-twenty commented 8 months ago

@gitstart-twenty I remember that some format were not supported by sharp. If this works, this is great! But I'll double check it today that all previously supported format are still supported with this change

Alright @charlesBochet

This handles both image/vnd.microsoft.icon and image/x-icon MIME-types though.