Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

EXIF Removal

66 sites Security covered
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();
        }
      }

Activity

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

Release Timeline

Releases

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