Does File metadata EXIF have the ability to retain EXIF data when Drupal resizes on upload

Created on 14 July 2023, over 1 year ago
Updated 15 July 2023, over 1 year ago

Drupal strips EXIF data from images when they are uploaded if the image max resolution has been set

My question is: Does the File metadata EXIF module have a mechanism to retain EXIF data when Drupal resizes on upload?

Steps to reproduce

Create a node type with an image field. In the image field settings, set the maximum resolution to a value for width and height. Upload an image that has EXIF data. Inspect the image and note that the resized image that Drupal uploads no longer contains EXIF data.

Proposed resolution

If the File metadata EXIF module can retain the EXIF data on an image upload perhaps it can be used to reintegrate that data into the resized version when Maximum Resolutions are applied to the field.

If that's not the purpose or within the means of this module, please feel free to close as "Works as Designed".

Cheers,
Andrew

💬 Support request
Status

Active

Version

3.0

Component

Code

Created by

🇨🇦Canada awasson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @awasson
  • 🇮🇹Italy mondrake 🇮🇹

    If you were using Imagemagick as the image toolkit, you would find that EXIF data is retained.

    The GD toolkit, Drupal's core, conversely drops any EXIF data segment when manipulating images. That's because it's the behavior of the GD library itself.

    The metadata taken via the EXIF plugin from the SOURCE image file could be reused to write it back to the TARGET image file uploaded, yes. The PEL library that the plugin uses allows that. But 1) I have concerns on the test coverage of PEL wrt rewriting, 2) in any case I do not think such a thing should be done in this module, rather some other code that could use this module.

  • 🇮🇹Italy mondrake 🇮🇹

    Actually, Split ImageStyle into the config entity and a separate event-based image processing service Needs work in core would be a step forward towards allowing manipulating files during upload. But that's another story.

Production build 0.71.5 2024