nitter icon indicating copy to clipboard operation
nitter copied to clipboard

Add fallback for devices without WebP support

Open bugzillus opened this issue 3 years ago • 6 comments

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.)

bugzillus avatar Apr 01 '23 19:04 bugzillus

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.

zedeus avatar Apr 01 '23 22:04 zedeus

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

bugzillus avatar Apr 02 '23 20:04 bugzillus

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

bugzillus avatar Apr 02 '23 20:04 bugzillus

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.

WineAunt avatar Aug 13 '23 23:08 WineAunt

No, there's no option for this.

zedeus avatar Aug 13 '23 23:08 zedeus

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.

WineAunt avatar Aug 13 '23 23:08 WineAunt