Good questions.
isdphj I've cached all my photo's thumbnails by browsing to each directory and scrolling through them on my laptop (is there a better way?)
There is a tasks.php
plugin which was not meant for public (yet at least), which can process thumbnails. See the post below and scroll down to my reply #4 for basic instructions.
https://forum.files.gallery/d/77-precache-image-thumbnails
isdphj but if I browse from my smartphone, it doesn't seem to use these cached thumbnails, and instead generates them again (or alongside the existing ones).
That's because there are two thumbnail sizes by default image_resize_dimensions and image_resize_dimensions_retina. The point of this, is to provide higher quality thumbnails to 2-3x density retina screens (new monitors like Macbook, new mobile phones), while keeping a normal size for traditional 1-to-1 pixel screens. I am guessing your laptop requests normal size, while your mobile requests retina size.
If it's important for you to avoid processing two thumbnails, you could easily disable image_resize_dimensions_retina
by setting it to 0
or to the same value as image_resize_dimensions
, in which case it would only create one thumbnail for each image. In this case, it would use image_resize_dimensions
for all screens, so the quality on retina screens would not be quite as good. Alternatively, you could increase image_resize_dimensions
to 480
for better quality, although this means it will load slightly larger images also on traditional screens that can't take advantage of the higher dimensions. It's really a matter of priorities, as any option would work fine ...
isdphj My question is, is there a device specific cache?
Yes, although it would be "screen-density" specific cache. Files gallery will serve image_resize_dimensions
to screens with devicePixelRatio 1 and image_resize_dimensions_retina
to screens with devicePixelRatio 2 or higher.