Uses AI Vision Models to automatically suggest optimal focal points and crop areas for images. It integrates with the Focal Point and Image Widget Crop modules.
Requirements
- Drupal 10.3+ or 11
- AI module with at least one vision-capable provider configured that handles structured output (e.g. OpenAI with GPT-4o/GPT-5.1)
Installation
composer require drupal/ai_image_crop
drush en ai_image_crop
Setup
- Go to Administration > Configuration > AI > AI Image Crop
(/admin/config/ai/ai-image-crop) - Select which AI Model to use which supports vision (defaults to the one selected in the AI module config)
- Configure maximum iterations and default prompts as needed
- On your content type's Manage form display, enable the "AI crop" checkbox on the Focal Point or Image Widget Crop widget settings
Usage
When editing content, click the Suggest AI Crop button on an image field. The module will send a scaled-down preview to the AI, which analyzes the image and returns suggested crop coordinates. You can adjust the result manually before saving.
Bulk processing is also available via the AI Image Crop action on content admin views.
Documentation
Full documentation is available in under https://project.pages.drupalcode.org/ai_image_crop/.
Note that not a single line of code has been written by a human on the first commit on this project as a proof of concept. There has however been reviews of the code for security concerns and maintainability. The module will not have security review enabled, until a full code review has been done. The ongoing maintainance of the module will be handled like any other module, since code agents are still having issue with too verbose code over too many edits.
Project information
- Project categories: Artificial Intelligence (AI), Media
- Ecosystem: AI (Artificial Intelligence)
- Created by marcus_johansson on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
Releases
Development version: 1.0.x-dev updated 11 Sep 2026 at 15:25 UTC


