thunder icon indicating copy to clipboard operation
thunder copied to clipboard

Data saving mode

Open sombresu opened this issue 2 years ago • 10 comments

Is your feature request related to a problem? Please describe. Limited data plan on a third world country. Also as soon as the app is opened, It uses so much data.

Describe the solution you'd like Reduce image preview Not auto buffering videos an gifs Reduce video resolution

sombresu avatar Aug 21 '23 23:08 sombresu

This will be difficult. Lemmy does not currently provide lower quality versions of media for a lot of stuff, as it is often not even hosted on the instance. As such, its not possible to just "reduce resolution" of content to save data use.

CTalvio avatar Aug 23 '23 00:08 CTalvio

Yeah, as @CTalvio mentioned, it would be a bit difficult to reduce data usage down at this point in time because there's no option to change the quality of the images/media that is retrieved from lemmy.

One way to reduce data consumption is to reduce the amount of posts that get loaded in, or to do some further optimizations on our caching and network calls. However, this will take some time to do and this will only continue to get better over time as we continue working on Thunder! Reducing the amount of posts that get loaded in is also fairly minimal in terms of data usage so it would not improve data consumption much.

An extreme alternative would be to host our own servers which downscale the images and act as a proxy between the app and the lemmy instance. However, this brings in a whole new level of complexity and issues which would be best to avoid at this point in time.

hjiangsu avatar Sep 05 '23 15:09 hjiangsu

It might be worth adding a setting to not load images for use in thumbnails at all.

CTalvio avatar Sep 05 '23 15:09 CTalvio

That's a good idea, that would definitely help alleviate data usage. Maybe this can be grouped as a setting for "Data Saving Mode" along with any other tweaks such as loading less posts/comments/etc.

@micahmo @ajsosa thoughts on other suggestions for lowering data usage?

hjiangsu avatar Sep 05 '23 16:09 hjiangsu

I have discovered, that at least with images hosted on a lemmy instance, we in fact can request lower resolution images.

This image hosted on sopuli.xyz, can be requested in a variety of resolutions by using ?thumbnail=512&format=webp as a query string.

For example: https://sopuli.xyz/pictrs/image/cd319103-2136-48d5-a326-fb0afed527b0.png?thumbnail=512&format=webp for 512p height image.

64p https://sopuli.xyz/pictrs/image/cd319103-2136-48d5-a326-fb0afed527b0.png?thumbnail=64&format=webp 128p https://sopuli.xyz/pictrs/image/cd319103-2136-48d5-a326-fb0afed527b0.png?thumbnail=128&format=webp 256p https://sopuli.xyz/pictrs/image/cd319103-2136-48d5-a326-fb0afed527b0.png?thumbnail=256&format=webp 512p https://sopuli.xyz/pictrs/image/cd319103-2136-48d5-a326-fb0afed527b0.png?thumbnail=512&format=webp 1024p https://sopuli.xyz/pictrs/image/cd319103-2136-48d5-a326-fb0afed527b0.png?thumbnail=1024&format=webp

CTalvio avatar Sep 08 '23 19:09 CTalvio

Further discovery. I have investigated this more, and it works even with images hosted outside a lemmy instance. The instance does in fact cache thumbnails even for externally hosted media, though not for all file types.

Still, this will allow for a significant reduction in data use!

CTalvio avatar Sep 08 '23 19:09 CTalvio

Oh wow, I didn't know that was possible either - do you know if the parameter is for width or height? It seems like its width, but thats just an assumption!

hjiangsu avatar Sep 08 '23 20:09 hjiangsu

Oh wow, I didn't know that was possible either - do you know if the parameter is for width or height? It seems like its width, but thats just an assumption!

It is for height. I discovered this because I went investigating why posts sometimes had low resolution on my Photon instance. The taller images get much less resolution for their width with the same 512p height regardless of aspect ratio.

CTalvio avatar Sep 08 '23 22:09 CTalvio

not to necropost, but id love the option to not load images at all when on data, because i have 500mb of data, and images eat that very fast

Blisterexe avatar Mar 25 '24 01:03 Blisterexe

@Blisterexe

I believe that is an existing issue here: https://github.com/thunder-app/thunder/issues/352. I'll see if I have the time to get to it!

hjiangsu avatar Apr 12 '24 21:04 hjiangsu