-
Notifications
You must be signed in to change notification settings - Fork 752
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
Resize favicons before storing them #2998
Conversation
Is there a way to avoid resizing the image if the size is already 16x16? Optionally, adding a unit test would be nice. |
512ccb5
to
a295840
Compare
Tests and checks added :) |
f0a00aa
to
7fb50f1
Compare
Some websites are using images of O(10kB) when not )O(100kB) for their favicons. As miniflux only displays them with a 16x16 resolution, let's do our best to resize them before storing them in the database. This should make miniflux consume less bandwidth when serving pages, for the joy of mobile users on a small data plan. Of course, images that already are 16x16 aren't resized.
953fc76
to
7760711
Compare
I haven't had a chance to actually test this yet, but do you know how this interacts with scaling? For example, Miniflux's 16x16 favicons are actually displayed using 32x32 device pixels on my desktop with 2x scaling. I'm assuming that resizing them down to 16x16 will make them (more) blurry. Maybe using 32x32 or even 48x48 might be a safer option. |
Oh, good point! 32x32 sounds good to me, why 48x48? Are there really people downscaling resolution 3 times? |
As suggested by @michaelkuhn in miniflux#2998 (comment)
As suggested by @michaelkuhn in #2998 (comment)
As suggested by @michaelkuhn in miniflux#2998 (comment)
Some websites are using images of O(10kB) when not O(100kB) for their favicons. As miniflux only displays them with a 16x16 resolution, let's do our best to resize them before storing them in the database. This should make miniflux consume less bandwidth when serving pages, for the joy of mobile users on a small data plan.