Connect the classic editor
Configure the following callback on an existing Studio-backed field.$publishEditedVersion is your application’s callable, responsible for authorizing the reference and returning the new pinned Studio reference.
Connect an AI action
UsestudioAiImageEditor() to configure the native FLEX AI action. The configuration callback receives an EditImageWithAiAction.
$configureAiAction callable. It must configure the source and acceptance callbacks below.
FLEX provides
ImageEditPreview and ImageEditInput under Bjanczak\FilamentFlexFields\Support\Media\ImageEditing. Generation can produce several candidates. Publication belongs in the acceptance callback, after the user chooses a candidate.
Generating an AI candidate leaves the library version unchanged. Publish only after explicit acceptance, such as Use this version. Read
$field->shouldDeleteReplacedFiles() in the acceptance callback to apply the same PHP policy as the classic editor. The action is available only when the field is enabled and FLEX has configured image-editing models.
Refresh the selected tile
$field->getStudioInlineEditedThumbnailPreset() as inlineImagePreset when scheduling processing with ThumbnailProcessor::schedule(). Generate the requested tile rendition before presenting the accepted result if the form needs it immediately. Other variants follow the configured processing pipeline.
Configure cleanup in PHP
$deletePreviousVersion. The AI acceptance callback reads the same field policy. Commit and verify the replacement before retiring the previous version. Referenced versions or temporarily failing storage can leave cleanup pending for scheduled maintenance. Previous-version retention