I have some questions about thumbnail regeneration. When does kirby regenerate thumbnails?
I have a kirby installation where the website is put on the server via git, but the content folder via Dropbox. This is because it allows my coworkers to just drop images in the correct folders, which they find very easy. One of them did just that, overwriting an image because the new one has the same filename. The file is synced correctly, but the thumbnail is still the old one. So how can I force kirby to regenerate the thumbnail?
Edit: php runs as user www-data and the content and thumbs folder are owned by www-data. However it appears that no new thumbnails are being generated… Could this be a permissions issue?
Second edit: it is a permissions issue. The content folder in Dropbox is owned by another user (me), and then symlinked with the website, but www-data also needs to be owner of that folder. This presents some other difficulties but now I know what the problem is.
Well the easy way is to just trash the contents of the thumbs folder. The thumbs will get regenerated when the pages get accessed next in a browser, but I guess only if the permissions allow for it.
So even with www-data as owner of the thumbs folder, it looks like new thumbnails are not being regenerated. I deleted the thumbs folder for a new page, refreshed, and a new folder was created. However, no thumbnails in it were generated. What could cause this?
Look in your PHP log file for errors. If you don’t know where the php log lives, throw a phpinfo page up on the server and it will tell you. I suspect the permissions are screwed on the temporary working folder.
Ah of course. This is my nginx log. It shows some errors from when I tried to change the nginx and php user—I thought that if I changed it to the same user as the Dropbox and ssh user it would solve my problems, but that just caused different problems. Below that some errors about uploading an image that was too large, but other than that, I don’t see anything about thumbnails.
Ah well im not expert on Nginx im afraid but there is a line in there down bottom there that gives me a hunch.
client intended to send too large body I think your PHP max body size is to low. This means if you post an image larger than that, it will fail.
Try setting these values higher in the php.ini and also thinking about giving PHP more ram to work with.
upload_max_filesize = 10M
post_max_size = 10M
client_max_body_size = 10M;
memory_limit = 64M ; Maximum amount of memory a script may consume
I find 128M works better than 64M, I work on a lot of portfolio style sites with large images.
and also I think your permissions are screwed on your temp folder (or the path is wrong):
PHP message: PHP Warning: Unknown: open(/var/lib/php/sessions/sess_utm94dsc1vgsaa5fv7788dpga7, O_RDWR) failed: Permission denied (13) in Unknown on line 0
PHP message: PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/sessions) in Unknown on line 0" while reading response header from upstream, client: 83.85.63.225, server: davlstudio.com, request: "GET /panel/ HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm-robin.sock:", host: "davlstudio.com"
Theres some potential help on that in this thread.