0
Under review

Thumbnail loads, preview doesn't unless I zoom

Rudhra 7 months ago updated 6 months ago 4

I have tried to narrow down the cases when this happens, for example when an image is large (15MB), average (7MB) or small. Strangely, it does not always happen with large images. It seems entirely random:

Doubleclicking on an image first shows the thumbnail (for less than a second) while the preview loads. But in some cases I am presented with this, even though I ran the thumbnails php script. 

The current workaround is to hit the + button to zoom, since that loads the full image, often slightly zoomed, forcing me to have to zoom out.

Filing as bug because I could not figure out why this happens, the next image loads its preview just fine, then 3 don't, then a few do again etc. 

Under review

I recommend you to check the PHP error_log for any possible related entries and make sure log_errors is On.

Whether I execute either one of these (with -size large or without), the output always shows it is creating 400x400 thumbnails.

This could be the reason none of my files actually seem to have a working preview.

make_thumbs.php superuser

Will generate thumbnails for all files located in the home folder of the user with the username superuser. Not specifying a username will apply the action for each existing user account. It will not regenerate already existing thumbnails.

make_thumbs.php –username admin –size large

Will generate high-re previews for all files located in the home folder of the user with the username superuser. Not specifying a username will apply the action for each existing user account. It will not regenerate already existing previews.

example (this user doesn't have files that require processing, but for other users, only 400x400 thumbs are generated with or without -size large):

docker exec -w /var/www/html/cron -it filerun php make_thumbs.php mahesh -size large

-------------------- START ----------------------
Image size: 400 x 400
Generating thumbnails for mahesh's files:

Getting directory listing...: 13 files found

Processing files:
12 /user-files/extern/Mahesh/IMG-20180610-WA0005.jpg ............................. ... DONE (Doesn't require processing)
11 /user-files/extern/Mahesh/IMG-20180610-WA0004.jpg ............................. ... DONE (Doesn't require processing)
10 /user-files/extern/Mahesh/VID-20180610-WA0001.mp4 ............................. ... Already cached
9 /user-files/extern/Mahesh/IMG-20180610-WA0001.jpg ............................. ... DONE (Doesn't require processing)
8 /user-files/extern/Mahesh/Pre Obelix/Knipsel.png .............................. ... DONE (Doesn't require processing)
7 /user-files/extern/Mahesh/Pre Obelix/VID-20181010-WA0011.mp4 .................. ... DONE (Doesn't require processing)
6 /user-files/extern/Mahesh/Pre Obelix/VID-20181107-WA0002.mp4 .................. ... DONE (Doesn't require processing)
5 /user-files/extern/Mahesh/Pre Obelix/VID-20181107-WA0034.mp4 .................. ... DONE (Doesn't require processing)
4 /user-files/extern/Mahesh/Pre Obelix/VID-20181224-WA0005.mp4 .................. ... DONE (Doesn't require processing)
3 /user-files/extern/Mahesh/Pre Obelix/VID-20190126-WA0011.mp4 .................. ... DONE (Doesn't require processing)
2 /user-files/extern/Mahesh/Pre Obelix/VID-20190628-WA0002.mp4 .................. ... DONE (Doesn't require processing)
1 /user-files/extern/Mahesh/Pre Obelix/VID-20191103-WA0000.mp4 .................. ... DONE (Doesn't require processing)
0 /user-files/extern/Mahesh/Pre Obelix/VID-20200325-WA0003.mp4 .................. ... DONE (Doesn't require processing)

0 files processed.

------------------- END --------------------------

Ah, correct format is --size large instead of -size large. It works now. 

Actually: the thumbnails.php scrpt does NOT work if you use --size without --username. It does work without username and without --large.

For thumbnails, you can do it with 1 command. For previews, you need to do it per username. It would be great if we can allow this to work without usernames.

To use FileRun with existing files, you have to use the thumbnails.php script for all users to create the thumbs and previews initially.

php make_thumbs.php --size large 
-------------------- START ----------------------
Image size: 2480 x 1000
Generating image previews for --size's files: User not found!