Thumbnail images are larger files than needed
Currently thumbnail images seem to be the full sized images, so thumbnails that are very large images can take a while to load. This slows down the loading of the page and also uses more data than necessary. Ideally the thumbnails should be compressed. This issue is more obvious on the compact layout since there are more thumbnails on the screen at a time.
Thanks!
/pictrs allows params for image size.
Would need consideration into pixel density, and making this a nice reusable function we can call everywhere.
Putting one example I just found, since this thread has no link https://lemmy.world/post/1224033
A thumbnail of ~2.5MB.
This can be worked on for compact view, but blocked for large post view because there's no way to apply a maximum width constraint to images with pict-rs.
More investigation - I am going to include thumbnail sizing for community and person avatars, as well as link thumbnails in compact view.
Unfortunately, further optimization depends on us getting image sizes from Lemmy. Our dependencies rely on image size, so we cannot optimize with thumbnails because we would not be able to determine the true image size.
This is being tracked in https://github.com/LemmyNet/lemmy/issues/3328. I encourage you to follow that issue and open a new issue on Voyager once that is resolved! Thanks!