bpatrik/pigallery2

[Suggestion] resize images for display

palitu opened this issue ยท 4 comments

Is it possible to resize an image for viewing in 'full screen'? I have some images which are in the order of 10Mb each.

  • huge images are not good for mobile bandwidth
  • longer load times

My suggestions is that the images a resized to a smaller resolution that is suitable for display on a screen. There are a number of dynamic methods of doing this, but the simplest implementation would be to have a configuration item which you set a static maximum size for the image. It could even be opt in/out. download would still be the original file.

This would require a little more work on part of the server, but should not be too onerous.

future improvements could be:

  • create mediums during index
  • dynamic sizes based on screen resolution

cheers

Hi

I was considering to resize/encode original media files.
Especially for videos since browsers can only play a very few codes + in case of a large file, no way to watch a video over my home internet.

For photos I'll do something similar what I do with the thumbnails. (like you can add certain resolutions, like 720p, 1080p, 4k, infinite and the app chooses the most appropriate one)

So I'll add this. But again no promise for a deadline. But I might take it with a higher priority, since its a relatively simple feature.

Patrik

G'day Patrik,

just wondering if you have had a chance to look into this one?

No pressure if you havent, just curious.

cheers,

Hi,

Sorry but I got super busy with finishing up my PHD.
I'm still working on finishing #56.
Hopefully I'll have more time during the summer or during fall.

Best,
Patrik

Hi,

I have added this feature in one of the latest commits.
Should be part of soon-to-be-released v1.8.
There are several breaking changes both in docker and config. Read more here: https://github.com/bpatrik/pigallery2/blob/master/docker/README.md

Best,
Patrik