Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Trash 3.0.33 Minor update available for module trash (3.0.33). EOL Warning: Drupal 11.0 has reached end of life and no longer receives security updates. Usage Milestone: Focal Point Module focal_point crossed 1,000 active installs. Release: UI Patterns (SDC in Drupal UI) 2.0.20 Minor update available for module ui_patterns (2.0.20). Release: Trash 3.1.0-rc1 First release candidate for module trash (3.1.0-rc1). Release: Country 2.2.0 Minor update available for module country (2.2.0). Usage Milestone: Ultimate Cron Module ultimate_cron crossed 1,000 active installs. Usage Milestone: Easy Breadcrumb Module easy_breadcrumb crossed 1,000 active installs. Usage Milestone: Config Filter Module config_filter crossed 1,000 active installs. Usage Milestone: Blog Module blog crossed 1,000 active installs.

Crop Media On Upload

7 sites No security coverage Drupal 10–11 Crop ecosystem
View on drupal.org

This module automatically creates separate media entities for different crop selections made during image upload, streamlining the process of generating various aspect ratios or sized versions of an image. It allows users to upload a single image and define crops using the Image Crop Widget to generate multiple media entities for each variation.

Automatically generate separate media entities for different crop selections defined during the initial image upload.

Introduction:

Crop Media on Upload streamlines the editorial workflow for sites requiring multiple aspect ratios (e.g., Square, Hero, Portrait) for a single image asset. It can also be used to resize images to a defined size(s) on upload too.

While the use of Image Styles will cover many scenarios, based on a single source image, some projects may require more specific targeting of the cropping/resizing of images and, potentially, multiple different shapes and sizes of an image for different uses.

Traditionally, this would mean using third-party image editing tools first to create the correct size/shape images and then having to upload each one to your Drupal site as its own Media entity.

This module allows users to upload a single original image, define their crop shapes (and, optionally, specific sizes) and then use the ImageCropWidget module to define the different crops on upload. It then automatically handles the creation of independent media entities for each crop/size variation.

Key Features:

  • Automatic Multi-Crop Generation: Creates new, separate media entities for every defined and selected crop type (e.g., Square, 16:9, Portrait) immediately upon upload.
  • Resize on upload: Optionally set fixed sizes for your generated crop versions, including multiple sizes per crop style.

How it Works:

  • Configure: Set which of your image-based Media type(s) you wish to use the functionality on and select which Crop Types (from the Crop API) should be enabled for that bundle.
  • Upload: When a user uploads an image to a configured Media type, they are presented with the selected cropping tools.
  • Process: Upon saving, the module generates a unique, cropped image file for every selection and creates a new Media entity for each, using the original title plus the crop label (e.g., "My Image - Square"). Users can choose whether to also keep the original image or just retain the cropped versions.

Requirements:

Installation & Configuration:

  • Install the module as usual via Composer.
  • Set up your crop types via /admin/config/media/crop
  • Navigate to /admin/config/media/crop-media-on-upload.
  • Select the Media types you wish to enable.
  • Map the image field and select the desired crop styles for each type.
  • (Optional) Set a fixed size/sizes for the crop image to be resized to after cropping.
  • (Optional) Set a global suffix for original images or enable the "Don't keep the original image" setting for specific bundles.

Note for Administrators: This module dynamically manages the form display for configured image fields. While active, manual changes to the widget type for those fields in the "Manage Form Display" tab will be overridden to ensure consistent functionality.

Depends on

Dependencies of the latest stable release

  • crop Drupal core
  • image_widget_crop Drupal core
  • media Drupal core
  • media_library Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Apr 2026
Latest release
4 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.2 Stable 10–11 Apr 16, 2026
1.0.1 Stable 10–11 Apr 16, 2026
1.0.0 Stable 10–11 Apr 15, 2026