Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

media_contextual_crop

339 sites Security covered
View on drupal.org

Provides basic API for Media Contextual Cropping. This module is just a plugin type & service provider.

Please look at the other modules of the Context Cropping Familly

Configuration

This is the base/Api module, for using Contextal Cropping Capabilities please check the implementation :

- Media Contextual Cropping Embed
- Media Contextual Cropping Reference

And the crop plugin supported :

- Media Contextual Cropping Focal Point Adapter
- Media Contextual Cropping Image Widget Crop Adapter

Branches

1.x

Legacy branch, generating copies of source image.

2.x

New approach based on context in crops.

How fix the error EntityStorageException: "'context' not found" :
This version use this patch on CROP module.
Please be sure the patch are applied (composer reinstall drupal/crop) and the Database Structure Update are applied too ( crop_update_8006 ).

Please check Bug & Tips

How it's work

Saving contextual crop data

- On referenced field
For media referenced fields, the Media Contextual Cropping Reference module will use media_library_media_modify (waiting core feature resolution) in order to set and save contextual Crop Data

- On embed Media
For embed Media, the the media_contextual_crop_field_embed module provide a CKeditor 5 plugin in order to invoke a modal for setting crop Data.
These data are saved in the drupal-media html node inside the wysiwyg.

Render multiple derivativ from the same media/image with the same style (but different crop)

This is bigger issue with this kind of functionality. The Drupal Core ImageStyle processing CAN NOT (By Design) produce more than one derivativ for one couple Image/Style.
The CROP API, just add the capability to "choose" the part of the image.

In order to avoid this problem, MediaContextualCrop modules (2.x) branch are based on a specific image_formater (replacing the core one) to generate a contextualized URL.

"Et voila"

1.x to 2.x Update process

The central point of this migration is the use of a specific "Contextual Crop Image" format on the media image field.
This formatter must be present on the image field to use the contextual crop.
A Drush command ( drush media_contextual_crop:migrateToImageFormater ) can do the configuration changes automatically (only on media entites and if the chosen image style uses a crop).

How to

A documentation are updated here

Activity

Total releases
4
First release
Jul 2025
Latest release
1 month ago
Release cadence
83 days
Stability
100% stable

Release Timeline

Releases

Version Type Release date
2.1.9 Stable Mar 9, 2026
2.1.8 Stable Aug 4, 2025
2.1.7 Stable Jul 11, 2025
2.1.6 Stable Jul 3, 2025