Skip to content

What is AI Image Crop?

AI Image Crop is a Drupal module that uses AI vision models to automatically suggest where an image should be cropped or where its focal point should be placed.

Instead of manually dragging a crop handle or focal point marker for every image you upload, you click a button and let an AI model analyze the image content. The module then sets the crop or focal point for you. You can still adjust the result manually afterwards.

Supported widgets

The module integrates with two popular image cropping approaches in Drupal:

  • Focal Point -- the AI places a single focal point on the most important part of the image. Drupal's image styles then use this point to decide how to crop at different aspect ratios.
  • Image Widget Crop -- the AI suggests a specific crop rectangle for each configured crop type, respecting the required aspect ratio.

What you need

  • A Drupal 10.3+ or 11 site with the AI module installed.
  • At least one AI provider that supports vision (sending images in chat messages). OpenAI with GPT-4o or GPT-5.1 is the most commonly tested configuration.
  • The Focal Point module and/or the Image Widget Crop module, depending on which widget you want to use.

How it is triggered

There are four ways to run the AI crop:

  1. Widget button -- When editing content, each image field shows a "Suggest AI Crop" button. Clicking it sends the image to the AI and updates the crop or focal point in the widget immediately.
  2. Bulk action -- On content admin views (e.g. /admin/content), select multiple nodes and apply the "AI Image Crop" action to process all their image fields at once. The action also works with Views Bulk Operations.
  3. Drush -- Run drush ai-image-crop:apply to process entities from the command line.
  4. Programmatically -- Call the ai_image_crop.service service directly from custom code.