Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

EXIF Removal

54 sites Security covered Drupal 10–11 Exif ecosystem
View on drupal.org

This module automatically removes sensitive metadata, such as GPS location and device information, from uploaded images to protect user privacy. It works in the background during file uploads, stripping EXIF data using GD or ImageMagick.

EXIF Removal is a privacy-focused Drupal module that automatically strips sensitive metadata from uploaded images. It protects user privacy by removing GPS locations, device information, and timestamps that could potentially expose personal information.

The module works silently in the background during the file upload process. When users upload images through any Drupal form (content creation, user pictures, media library, etc.), the module intercepts the upload, processes the image to remove sensitive metadata, and then allows the upload to complete normally.

It uses GD and imagejpeg() to create a new copy of the image, imagejpeg() will reencode the image, we use the quality value 80 because the comment from PHP page https://www.php.net/manual/en/function.imagejpeg.php#76780

I did an experiment with the image quality parameter of the imagejpeg() function when creating jpegs. I found the optimal image quality with file size is taken into account to be 80 - very close to the default value of 75.

Anything over 80 results in an unnecessary increase in file size without much increase in image quality.

      // Remove all EXIF data from the image.
      if ($file->getMimeType() == 'image/jpeg') {
        // Use GD to strip all EXIF data by re-saving the image.
        $image_resource = @imagecreatefromjpeg($path);
        if (!$image_resource) {
          // Failed to create image resource.
          return FALSE;
        }

        // Create a new image without EXIF data.
        imagejpeg($image_resource, $path, 80);
        imagedestroy($image_resource);

        return TRUE;
      }

It also supports imagemagick if image_effects is installed.

      $image = $this->imageFactory->get($file->getFileUri());
      if ($this->moduleHandler->moduleExists('image_effects')
        && $image->getToolkit()->getPluginId() == 'imagemagick') {
        $toolkit = $image->getToolkit();
        if ($toolkit->apply('strip')) {
          $image->save();
        }
      }

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Mar 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 6
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
1.0.0 Stable 10–11 Mar 26, 2025
1.0.0-beta4 Pre-release 10–11 Mar 18, 2025
1.0.0-beta3 Pre-release 10–11 Mar 13, 2025
1.0.0-beta2 Pre-release 10–11 Mar 13, 2025
1.0.0-beta1 Pre-release 10 Mar 12, 2025
1.0.x-dev Dev 10–11 Mar 12, 2025