voyager icon indicating copy to clipboard operation
voyager copied to clipboard

Thumbnail images are larger files than needed

Open qilto opened this issue 2 years ago • 1 comments

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.

qilto avatar Jul 04 '23 02:07 qilto

Thanks!

/pictrs allows params for image size.

Would need consideration into pixel density, and making this a nice reusable function we can call everywhere.

aeharding avatar Jul 04 '23 18:07 aeharding

Putting one example I just found, since this thread has no link https://lemmy.world/post/1224033

A thumbnail of ~2.5MB.

80avin avatar Jul 17 '23 07:07 80avin

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.

aeharding avatar Jul 20 '23 19:07 aeharding

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!

aeharding avatar Jul 30 '23 03:07 aeharding