Issues with nginx and asset thumbnails with spaces

We seem to have an issue with thumbnails of asset images used in a wysiwyg which have spaces in their names.

At first it is generated properly, but after that the try_files in nginx seems to have some trouble.
The url being called is

The image exists in /var/tmp/image-thumbnails/sectors/image-thumb__9__auto_1f891bd5eb142807016c2634ecc9a380/aqua culture.png

The url results in a 404 error with message

Thumbnail with name ‘auto_1f891bd5eb142807016c2634ecc9a380’ doesn’t exist

But nignx try files seems not to recognize this. I tried creating a file with %20 instead of space and then the image was returned by nginx.

When the thumbnail file does not exist, it is properly created and send to the browser.

Sure, I can create some code to strip off or replace spaces in asset filenames, but that doesn’t seem intended?

are you using the latest version of Pimcore?
It is pretty old, but maybe this helps:


1 Like

Hi Christian,

Yep that seems the same issue.
Strange that the issue is closed, but as it seems a general issue it isn’t solved more properly.

In the mean time I added some code to filter out the white spaces in Asset folders and filenames using the pimcore.system.service.preGetValidKey as described.

maybe you can comment your issues and experiences to the issue.