Create add to media library for the prompt Explorer

Created on 14 June 2024, 14 days ago
Updated 18 June 2024, 10 days ago

Problem/Motivation

The image explorer creates images but it's hard to do anything with those images.

Proposed resolution

Create a button on the image explorer that allows you to click "add to media". It takes you to an add media form that allows you to fill out relevant meta data such as title and alt text etc.

Perhaps even save the prompt and llm settings used to create the image as well as a flag to say it was created by ai.

This only happens if media is installed.
(possibly should go in a seperate advanced image module but this might be simple enough for core and only if media is enabled).

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom yautja_cetanu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @yautja_cetanu
  • Status changed to Closed: duplicate 10 days ago
  • πŸ‡©πŸ‡ͺGermany Marcus_Johansson

    Missed this ticket, its done via: https://www.drupal.org/project/ai/issues/3455420 ✨ Allow to save media on file generating explorers Fixed . It built in also as helper functions into the core AI Provider API.

    So instead of
    pseudocode->getNormalized() or pseudocode->getRaw() for binary outputs, you can now do:

    pseudecode->getAsMediaReference($media_type, $filename);
    pseudocode->getAsFile($file_path);
    pseudocode->getAsImage($file_path);

    And it would create this if the modules are enabled, without the developer having to do anything else.

Production build 0.69.0 2024