I understand the issue, and it can be explained: Loading preview image for every directory is a relatively heavy process ... It creates separate requests for all subfolders, which require scanning each subfolder to locate a preview image with index.php?preview=
. However, if the folder has already been loaded, it means Files app already knows all the files inside, and can then just load/resize the designated preview image directly with index.php?file=
. The problem here is that you have excluded this file with files_exclude
, and therefore it's excluded also from the resizer also ... Technically, the file should probably be excluded with index.php?preview=
also, but that works slightly differently. Therefore, this is really a logical dilemma, because Files app is meant to always exclude requests if they match files_exclude
... Surely this makes some sense? Assigning a folder_preview_default
to _view.jpg
and then excluding that same file name with files_exclude
isn't something that should be expected to work. At least this is not planned by design.
I agree it can be avoided, but I need to consider the technical aspect. If a user wants to exclude a file, it could be for security reasons, and then it's entirely logical that this file should not be accessible from the resizer. What if you have secret_protected_file.jpg
and then anyone can access that with index.php?file=secret_protected_file.jpg
? Excluded means excluded.
I understand what you are trying to do. Let me think about it, and I will look into it for next release. For now, you may need to use another approach.