Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Geocoder 8.x-4.37 Minor update available for module geocoder (8.x-4.37). Release: Workflow Modeler 1.0.9 Minor update available for module modeler (1.0.9). Release: Vite 1.5.6 Minor update available for module vite (1.5.6). Release: Postmark Webhooks 1.2.0 Minor update available for module postmark_webhooks (1.2.0). Release: FileGate 1.10.0 Minor update available for module file_gate (1.10.0). Release: Menu Autopilot 1.4.0 Minor update available for module menu_autopilot (1.4.0). Release: Field Guard 1.3.0 Minor update available for module field_guard (1.3.0). Release: Audit Chain 1.9.0 Minor update available for module audit_chain (1.9.0). Module Revived: Decorative Images 1.3.6 Module decorative_images updated after 7 months of inactivity (1.3.6). Security Coverage: Pixie Dark Theme pixie_dark now has official Drupal security advisory coverage.

Media Compressor

No security coverage Drupal 11 · not 10 PHP >=8.3
View on drupal.org

Opt-in reduction of image and scanned (image-only) PDF uploads on Webform file elements, for Drupal 11.3+ and Webform 6.3

Users/Customers often scan paperwork on a multi-function device (MFD) with "Scan to PDF", or upload phone photos. Both routinely produce 3-30 MB files. This module shrinks those files at upload time, before Drupal stores them, so every downstream consumer (submission storage, emails, handlers, exports) gets the smaller file.

What it does

JPEG / PNG / WebP:

  • Rotated upright (EXIF orientation)
  • resized to fit 2000 × 2000 px (default)
  • re-encoded in the **same format**
  • All metadata (GPS, camera serials) is removed
  • Compression options configurable
  • There is an option to convert images to JPEG, but that is documented individually

PDF, where every page is exactly one full-page JPEG or 8-bit raster image, and nothing else:
Rebuilt as a new PDF with the same page count, order, size and rotation

  • each page image down-sampled to 150 dpi (default)
  • JPEG quality 70
  • Compression options configurable

Anything else (Word, Excel, GIF, TIFF, born-digital PDFs, OCR'd/searchable PDFs, PDFs with forms, links, attachments, scripts, signatures, encryption, CMYK or black-and-white CCITT/JBIG2 scans, etc.)

  • Left untouched

The file is only replaced if the result is at least 10% smaller (default).
The file name, extension and MIME type never change.

Typical results from testing (see the security review for the full test set):
Test file - Before - After
3-page colour A4 scan @ 300 dpi (JPEG) - 8.2 MB - 0.77 MB
1-page A4 scan @ 300 dpi (lossless / Flate) - 10.2 MB - 0.26 MB
12 MP phone photo - 5.8 MB - 0.34 MB

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Sep 2026
Latest release
1 hour ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.1 Stable 11 Sep 19, 2026
1.0.0 Stable 11 Sep 19, 2026