+2
Under review

Limited resolution for image gallery

adriaan 7 months ago in Feature requests updated 1 month ago 11

I have posted this request hidden as a comment about a week ago, but will now post it as feature request, as I feel this is an essential feature of a photo gallery/slideshow.


In slideshows FileRun will load the full resolution image, even if this is a studio quality image. This is the expected behaviour, but will put great strain on the user's internet connection - not to forget bandwidth limited mobile connections and server bandwidth. One solution would be to store resized images in the archive, which I consider unfavourable, as the archive should contain the original data (and it should be available for download).


With the thumbnail, a 400×400px version of the image is generated that is loaded as preview while the full resolution image is transferred. With the resolution of most mobile devices this is not satisfactory any longer and usage of only these images in the slideshow can not be enforced (to the best of my knowledge). In the ideal case it would be possible to have multiple resolutions, loading the resolution appropriate for the viewer (also 4k ready). With HTML5 responsive images it should be possible to implement such behaviour.



+1

First of all, thanks for this nice software.

For now the only limitation on filerun is the image gallery. As adriaan mentioned the thumbnails are too small for browsing a lot of photos, and in the other hand, graphicmagick/imagemagick is to slow with processing the images in the preview. :(

Are there any chances for improvements?

Thanks alot!

Under review

So we have the following:

- The existing thumbs are too small for a useful quick preview.

- On-the-fly resizing of the original is too hard on the server and slow for the user.

- Loading the original is .. slow(?) (I suppose this depends on how large are the photos, and how slow the network connection, but given that most people now stream HD videos on mobile connections, the limitations of the bandwidth is not something that we would take as an argument against loading high resolution images.)


So the only solution seems to be to somehow have intermediary sized versions stored/pre-generated for preview.


Cons:

- It requires a cron job.

- Hard to tell which files need this. If you have a photo archive with a million photos, you won't want this for all of them.

- Can take a lot of disk space.

- Can be hard on the server's hardware resources (CPU and RAM), making the web server slow to respond in some cases (FileRun is being used even on small servers such as a Raspberry Pi).

Possible options that I can think of:

- Configure delay time between loading the thumbnail in the preview and loading the full/large-size version.

- Always use the thumbnail for the preview (in other words: never generate large-size preview on the fly, never load original version of the photo).

- Command line script for processing intermediary preview versions for specified folder.

How would it be best for your particular cases? (Not limited to the above)

thanks for your very quick response.

as i dont know the limitation we face within php and filerun,

the best solution would be, to be able to browse a small photo-libary with around 5.000 images from web.

there arent any bandwith limitations, as most people got 100mbit internet speed at their homes.


thanks

For your particular case you can use:

$config['thumbs']['output_small_max_filesize_without_size_check'] = 20971520;

See http://docs.filerun.com/advanced_configuration for where to set this.

The above tells FileRun to just use the original file for preview, instead of generating a resized version using ImageMagick, if the file is smaller than 20MB (20971520 bytes).

Thats exactly the line i was looking for, works like a charm.

I couldnt find this configuration line in any of your documentations. Might be helpful for other users too.

One more question, related to this topic:

Is there any chance to set a different thumbnails size other than 400px?

Thanks for pointing it out, I've added it to the documentation.

Is there any chance to set a different thumbnails size other than 400px?

The thumbnail size can be changed from the FileRun control panel. It affects both the physical size of the thumbnails in the grid and their resolution.

+2

Dear Vlad,

Thank you for your reply and suggested solutions.
In our particular case the archive consists of both documents (hundreds of files) and image galleries (40 000+ photos). Most viewers are interested in browsing the gallery (at high speed, swiping through) and occasionally downloading a full resolution image for further use. Frequently users are on a bandwidth limited, mobile connection, where downloading the full image is undesirable.

In our use case it is no problem to (frequently) run a cronjob to detect and process new images (if not detected at upload) to generate intermediate resolutions of the image. (This is what we do with our current, custom software.) The solution could be as simple as having a setting for multiple thumbnail resolutions and advertising all to the browser. In our case we will just generate thumbnails of ~100px (folder index), 400px (loading/preview) and 1000px (viewing), having the browser select the appropriate resolution. On the fly resizing, with cache, is possible as well, but vulnerable to spikes in usage.

I believe that this would be an awesome solution.

How large, in bytes and pixels are your photos, on average?

+1

As our archive spans multiple years and cameras, there is not a single answer. I included statistics on the files below.

We would like to keep the original and the preview together, as maintaining two archives (full and reduced resolution) is ridiculously complicated to keep consistent. Our current reduced resolution versions used for the gallery are approximately 200-300 KiB (and limited on 870 pixels width) and are of sufficient quality for browsing.