-
-
Notifications
You must be signed in to change notification settings - Fork 826
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
feat: Allow switching the ImageManager driver #3195
Conversation
[ci skip] [skip ci]
Pay attention to the fact that ImageMagick by default not only doesn't strip the ICC profile but EXIF data in general, which means that GPS data contained in an image's EXIF could be unintentionally leaked to everyone. |
Could we inject the
We'd still be using |
Agreed. I'll look at adding something for this in |
If it helps, this is what I've been doing in a private extension in production for years I think: $exif = $img->getCore()->getImageProfiles('exif', false);
if (count($exif) > 0) {
$img->getCore()->removeImageProfile('exif');
} The |
I recently identified an issue where image uploads were rendered with different color gamuts if they had been processed by Intervention in any way (resized, etc), if they had an embedded icc color profile. By switching to
imagick
, this profile was respected. Therefore, I'd like to introduce the option to use either driver everywhere in Flarum.We use the
ImageManager
from Intervention in plently of places, both in core and extensions. Intervention supports two drivers -gd
(default) andimagick
. refThis PR adds the possibility to switch to
imagick
, if this is required.By default
gd
will still be used, however, adding the following toconfig.php
, one can specify the alternative:Extensions should update their code and refrain from
new ImageManager()
and resolve the singleton from the container instead.Necessity
Confirmed
composer test
).Required changes: