Add fallback for devices without WebP support #822

Open
opened 2023-04-01 15:58:34 -04:00 by bugzillus · 6 comments
bugzillus commented 2023-04-01 15:58:34 -04:00 (Migrated from github.com)

In the latest nitter release, images in tweets do not display any more in some browsers, and as there’s no image size given in the element, there’s no placeholder shown either to realize that something's missing (and to click on it to open the file separately).

Example: https://nitter.net/pic/media%2Fsomething.jpg%3Fname%3Dsmall%26format%3Dwebp
(The delivered file is in webp format.)

As the issue is not present in tweets that still deliver small images in png format (like from quoted tweets), it might be the webp format. There’s still quite a lot of devices and (unupdateable) browsers that do not support webp: https://caniuse.com/webp

Was there a change to display the small size images in webp rather than jpg and png? If yes, could you please consider reverting to jpg or png by default? Otherwise, nitter cannot be used by these browsers/devices and more. Thanks

(Escaping URL chars that appear in their special role might also not be the best idea, although it seems to work.)

In the latest nitter release, images in tweets do not display any more in some browsers, and as there’s no image size given in the <img> element, there’s no placeholder shown either to realize that something's missing (and to click on it to open the file separately). Example: https://nitter.net/pic/media%2Fsomething.jpg%3Fname%3Dsmall%26format%3Dwebp (The delivered file is in webp format.) As the issue is not present in tweets that still deliver small images in png format (like from quoted tweets), it might be the webp format. There’s still quite a lot of devices and (unupdateable) browsers that do not support webp: https://caniuse.com/webp Was there a change to display the small size images in webp rather than jpg and png? If yes, could you please consider reverting to jpg or png by default? Otherwise, nitter cannot be used by these browsers/devices and more. Thanks (Escaping URL chars that appear in their special role might also not be the best idea, although it seems to work.)
zedeus commented 2023-04-01 18:01:59 -04:00 (Migrated from github.com)

This was done a while ago to significantly reduce bandwidth (more than 30%) used to proxy images. According to caniuse 96.76% of users support webp, with the main exceptions being Internet Explorer and versions of Safari more than 3 years old. For that reason I am not going to revert it, but I will look into supporting a fallback format.

This was done a while ago to significantly reduce bandwidth (more than 30%) used to proxy images. According to caniuse 96.76% of users support webp, with the main exceptions being Internet Explorer and versions of Safari more than 3 years old. For that reason I am not going to revert it, but I will look into supporting a fallback format.
bugzillus commented 2023-04-02 16:44:18 -04:00 (Migrated from github.com)

Thanks. As nitter is a great alternative especially for lightweight clients and those that avoid the heavy J/S stuff at twitter.com, I assume that the caniuse statistics do not represent the actual nitter users. All Mozilla-based browsers before 2019 do not support webp as well, and many older browsers or devices cannot be updated.

The most simple and reliable server-side switch could be via HTTP accept header ( “image/webp” seems to be included in all major browsers now). https://developers.google.com/speed/webp/faq

Client-side, a element could be added around the , but this would only work with HTML5-capable browsers. https://caniuse.com/picture

Thanks. As nitter is a great alternative especially for lightweight clients and those that avoid the heavy J/S stuff at twitter.com, I assume that the caniuse statistics do not represent the actual nitter users. All Mozilla-based browsers before 2019 do not support webp as well, and many older browsers or devices cannot be updated. The most simple and reliable server-side switch could be via HTTP accept header ( “image/webp” seems to be included in all major browsers now). https://developers.google.com/speed/webp/faq Client-side, a <picture> element could be added around the <img>, but this would only work with HTML5-capable browsers. https://caniuse.com/picture
bugzillus commented 2023-04-02 16:47:17 -04:00 (Migrated from github.com)

... HTML5 (picture) element could be added around the (img), but this would fail with pre-HTML5 browsers. https://caniuse.com/picture

... HTML5 (picture) element could be added around the (img), but this would fail with pre-HTML5 browsers. https://caniuse.com/picture
WineAunt commented 2023-08-13 19:49:38 -04:00 (Migrated from github.com)

Is there a fallback option? Anything in options, or an instance that displays jpg/png and not webp on feed? It's sort of useless for me, sure I'm a luddite going against the tide, but a luddite I am, a luddite I will be, even upon death.

Is there a fallback option? Anything in options, or an instance that displays jpg/png and not webp on feed? It's sort of useless for me, sure I'm a luddite going against the tide, but a luddite I am, a luddite I will be, even upon death.
zedeus commented 2023-08-13 19:53:04 -04:00 (Migrated from github.com)

No, there's no option for this.

No, there's no option for this.
WineAunt commented 2023-08-13 19:55:35 -04:00 (Migrated from github.com)

Will there ever be? It useless on my 32 bit windows 7 machine. No pull request to support fallbacks? Even my mac has trouble supporting webp in the programs I use for video and photo editing. Just wish there was a fallback.

> Will there ever be? It useless on my 32 bit windows 7 machine. No pull request to support fallbacks? Even my mac has trouble supporting webp in the programs I use for video and photo editing. Just wish there was a fallback.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PAS/nitter#822
No description provided.