New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix and improve image validation when manipulating images #7666
Conversation
|
Quick question on this: Will adding a format to Reason I ask is that could make sense for some formats (eg. HEIC), but not others (eg. PDF, where you might want to generate thumbnails but also keep the original file). Which additional formats you want processed on upload and which you want to be able to process through the tag might not be the same. Appreciate that complicates things, guess the simplest solution is just to not use the process on upload feature in that situation. |
Yes. The solution I suppose would be to put PDFs in a separate container. |
To be clear, the only thing causing any images to be processed on upload (with regards to the original uploaded file), is your asset container settings here: If you set a "Process Source Images" preset there, then @jasonvarga is correct; Otherwise the |
0ce1755
to
b93343c
Compare
People are running into problems with glide server trying to process incompatible file types (see #7541), so we need whitelist which image formats get processed on upload, by glide tag, etc.
By default we are supporting these file formats...
...But as @jacksleight mentioned here, imagick supports over 100 additional image formats with the proper dependencies installed on the server, so we're also making this configurable...
This PR also expands mime type validation using Symfony's
MimeTypes
helper class, so that we can properly validate mime types for custom extensions configured as shown above. Before we were only allowingimage/*
mimetypes, but imagick can be set up to process PDF's (for example), so the mimetype could now be something likeapplication/pdf
.Fixes #7541
Closes #7652