Search by

drupal / ai_recipe_image_crop

Drupal-Infrastructure

Adds AI-suggested focal points to Images using the AI Image Crop module.

Package info

git.drupalcode.org/project/ai_recipe_image_crop.git

Homepage

Type:drupal-recipe

pkg:composer/drupal/ai_recipe_image_crop

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

1.0.0-alpha1 2026-09-09 19:02 UTC

This package is auto-updated.

Last update: 2026-09-10 20:11:38 UTC


README

Adds AI-suggested focal points to Images in the Media: Image bundle. Editors get a "Suggest AI Focal Point" button on the image field. Clicking it will leverage a vision-capable AI model to automatically place a focal point on the main subject. The result can still be adjusted by hand.

Requirements

  • Drupal 10.3+ or 11
  • AI Module
  • AI Image Crop
  • Focal Point
  • Configured default AI Vision provider (OpenAI GPT-4o/GPT-5, Anthropic Claude, Google Gemini, etc.) at /admin/config/ai/settings

Apply

  1. Set up a vision-capable provider before applying
  2. Install the recipe:
    composer require drupal/ai_recipe_image_crop
    
  3. Apply the recipe:
    drush recipe ../recipes/ai_recipe_image_crop
    drush cache:rebuild
    

What it does

  • Applies core's image_media_type recipe for the Media: Image bundle
  • Installs ai, ai_image_crop, and focal_point
  • Switches the field_media_image widget on the Image media type's default and media_library form displays to Focal Point
  • Enables the AI Suggestion button for the Image Fields

Note that the widget component is replaced wholesale: if you had customized the image widget's settings or third-party settings (for example a Field Widget Action), it will overwrite them. See: https://www.drupal.org/project/drupal/issues/3537773

Issue queue

Bugs and feature requests: https://www.drupal.org/project/issues/ai_recipe_image_crop