How to avoid WordPress stripping EXIF metadata when resizing images?

Metadata is information about an image, and can be included in JPEG image files.

EXIF metadata is information about the image recorded directly from the camera – for example, the exposure time and the date the photo was taken.

Read More

WordPress preserves EXIF information in full size images loaded to your website. It will also extract the Exif data to make it available for plugin developers.

When WordPress uploads images, in addition to uploading the Full Size image it automatically creates several differently sized versions of the image. By default: a Large, Medium and Thumbnail version.

The problem is that WordPress is stripping the EXIF data when resizing images. The resized images become “orphan”.

An “orphan” work is a work to which copyright cannot be determined or a work where the determined copyright holder cannot be contacted.

In the era of responsive images, it cannot be that the solution to keep the EXIF data of an image is to use the image in full-size.

Question:

  • How to force WordPress to keep EXIF data?

Digging further:

  • Is there a way to insert the EXIF data in resized images once they have been resized?
  • Is there a way to force wordpress to use another Image Processing System that is not stripping metadata from images?

Related posts

1 comment

  1. How to force WordPress to keep EXIF data?
    Switch the image processing to imagick. Your server must have it installed though.
    Either by using the plugin that does that,
    https://wordpress.org/plugins/mhm-forceimagemagick/

    or by adding the code in your theme:

    add_filter( 'wp_image_editors',               array( $this, 'allowedEditors' ) );
    
    public function allowedEditors()
    
    {
        return array('WP_Image_Editor_Imagick');
    }
    

    Is there a way to insert the EXIF data in resized images once they have been resized?
    You would have to create your own functional that extend the class-wp-image-editor-imagick and include them in your functions file.

    https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-image-editor-imagick.php

    Is there a way to force wordpress to use another Image Processing System that is not stripping metadata from images?

    Answered above.

Comments are closed.