-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Inconsistent default EXIF handling between GD and Imagick drivers #1471
Description
Describe the bug
Hi,
I’d like to report an inconsistency in how EXIF metadata are handled depending on the image driver (GD or Imagick) used by Intervention/Image.
This issue was initially discussed in the context of Glide, which relies on Intervention/Image:
thephpleague/glide#445
Current behavior
-
GD driver
EXIF metadata are always stripped, with no option to preserve them. -
Imagick driver
If the strip option is not specified, all EXIF metadata are preserved
If strip = true, EXIF metadata are removed while color profiles are preserved (which is great and expected)
Expected behavior
Ideally, metadata handling should be consistent by default across drivers.
Possible approaches :
- Make both drivers behave as if strip = true by default
- Or require explicit opt-in / opt-out for metadata stripping regardless of driver
- Or clearly document and expose consistent defaults across drivers
The current strip option for Imagick works very well (removes EXIF while preserving color profiles), so this feels mostly like a default behavior alignment issue.
Environment (please complete the following information):
- PHP Version: 8.4
- OS: Docker linux
- Intervention Image Version: 3.11.7
- GD and Imagick