This project is not covered by Drupal’s security advisory policy.

WORK IN PROGRESS!
https://www.drupal.org/project/focal_point/issues/2820362

Focal Point Cropping extends the Focal Point module by allowing content editors to draw a draggable, resizable focus area rectangle on images so key subjects are never awkwardly cut off during automatic cropping.

Features

While the standard Focal Point module lets you mark a single X/Y coordinate as the center of interest, a single point is not always enough when dealing with wide group photos, products, or multi-subject images across responsive aspect ratios.

  • Interactive Focus Area Box: Adds a draggable and resizable bounding box directly onto the Focal Point image widget preview.
  • Area-Aware Image Effect: Includes the Focal Point Area Scale and Crop image effect, which automatically calculates crop dimensions to keep your entire selected region centered and visible whenever possible.
  • Seamless Fallback: If no focus area is customized on an image, the effect gracefully falls back to standard single-point Focal Point cropping.

Common use cases: Editorial hero banners, team/group portraits, e-commerce product shots, and responsive art direction where a single focal coordinate results in cropped edges.

Post-Installation

  1. Enable the module: Install Focal Point Cropping via the Extend page (/admin/modules) or with Drush (drush en focal_point_cropping).
  2. Configure your Image Styles: Navigate to Configuration → Media → Image styles (/admin/config/media/image-styles). Edit an existing image style (or create a new one) and add the Focal Point Area Scale and Crop effect.
  3. Verify Form Display: Ensure your image or media field's Form Display (Manage form display) is set to use the Image (Focal Point) widget.
  4. Edit Content: Upload or edit an image on any entity form. Drag and resize the white dashed focus rectangle over the area you want preserved, then save.

Additional Requirements

  • Drupal Core: 11.1 or higher.
  • Focal Point: Provides the base focal point widget, preview modal, and crop integration.
  • Crop API: Required by Focal Point for storing crop coordinates and focus area metadata.

Similar projects

  • simple_crop. Also, A new kid on the block.
  • Image Widget Crop: Requires editors to manually draw separate crops for every individual aspect ratio/crop type. Focal Point Cropping lets editors define a single "safe area" once, and automatically adapts to any number of image styles.

AI Assistance Disclosure

Portions of this module's scaffolding, Drupal (11.1+) attribute hook OPP refactoring, image effect logic, and project documentation were generated with the assistance of Google's AI (Gemini), adapted from community work on Focal Point issue #2820362, and reviewed/maintained by the project maintainer.

Project information

Releases