Limited resolution for image gallery

adriaan 4 years ago updated by Vlad R 2 years ago 16

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.


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.


- 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.


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.


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.

we are still missing a solution for our photo gallery. there are so many neat solutions around, for example: [removed]

Solution to which problem?
(I have removed your link. Please don't advertise other commercial products here. If you like one better, simply use it instead of FileRun.)

if i set this line in the config:

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

everything is running smooth, the users are able to browse the galery quicky in full resolution.

though the cron job for processing thumbnails wont process newly uploaded images.

therefor i have to reset the config file, and rerun the cron job for the thumbnails, and vice versa.

so for me, and simply for many other users (see forum posts about thumbnails, preview, images processing),

filerun isnt able to handle image galleries like modern html5 sites do. (quickbrowsing/preview/full resolution images etc)

if you dont think so, pls tell us how to setup filerun for a modern browsing experience :)

thanks in advance

Your problem is still not clear to me. "Make it work like modern html5 sites do" or "provide modern browsing experience" doesn't really say much.

Are you referring to web linked folders as photo galleries, or browsing the FileRun user interface?
When do you want to see generated thumbnails, when do you want to see full resolution and when do you want resized preview? When do you want the generated resized to happen considering that it takes time?
The more specific you are, the better. Here's an example: user logs into FileRun, browses folders with pictures, using thumbnail/photos mode, my thumbnail size is set to X, thumbnails load slow/fast, preview loads slow/fast. It should instead work like this: ...

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


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.


Here are the options for controlling the resolution of the image previews.

This is what's currently in the development version:

The dynamic is the way FileRun currently functions, deciding automatically based on the user's screen and size of the photo if it will generate a resized version or just output the full size. In this mode, if a resized version is generated, it will not be saved on the server for subsequent requests. With the new "dynamic, cached" mode, all the different resized versions get saved on the server. (if the requested size is not far from an existing one, the existing one will be used, so this mode will take storage space but not waste excessively)
The rest of the modes should be self explanatory.

Just like for the thumbnails, there will be a command line script for generating the previews beforehand. It will obviously apply only when a fixed resolution is set (between "Small" and "Very large").

It should cover most setups, but feedback is welcome.