Generating Media in the Media Library
Wherever you pick media (a media field's Add media, or Insert Media in the editor), the Media Library shows the tab of each media type you may add. When a generator saves into that media type, the tab opens with an Upload | Generate with AI switch at the top. Generate with AI is marked New until it is opened. What you generate there is saved as that media type, like an upload in the same tab.

Generate
Choose Generate with AI in the tab of the media type.
Describe the image (or SVG, video), marked AI: say the subject, the setting and the style. The field starts empty.
Examples, beside the field, opens a list of up to eight sample descriptions. Pick one to put it in the field, ready to edit; it replaces the text in the box. If the site offers it, the Dictate button fills the description from your voice.
The info button beside Examples says which provider makes the result and that your description is sent there: "Made by AI with OpenAI. Your description is sent to OpenAI. Check the result before you use it." With site context it adds what context is used.
Open Options, when the site offers any, to choose a shape (with its pixel size), a format, a quality, a model, or an SVG style. Closed, it shows what is chosen, such as "Options (Square, PNG)".
Press Generate image (or SVG, video). It reads "Generating…" and the page says it can take up to a minute.
Under Generate, "Each press is a paid request to …" reminds you that every press costs credit (not shown for test providers, or when the site turns it off).


Review, Refine, Save
The result waits in the same step as an upload, with its Name and, for images and SVGs, its Alternative text filled in. By default AI writes both from the result, and the help under the alternative text says so: "Written by AI from the image. Check it." When the site fills them from your description instead, the help says "Prefilled from your description." An image is shown once, at a size you can check, with its file size, format and pixel size and an Open full size in a new tab link. When the media type uses Focal Point, set it on the generated image as on any upload.
Change the description and press Generate again to replace the result in place.
Remove goes back to the empty form, with your description kept.
Fix the name and alternative text, then Save, Save and select or Save and insert.

Other Languages
AI Media works in the language you write in, for all four kinds of media: image, SVG image, video and audio.
Image and SVG image. Describe the picture in French or Arabic and the result follows the description. The name and alternative text that AI Media writes are in that same language.
Audio. The text is read aloud in the language it is written in, so an Arabic text gives an Arabic clip. The name is in that language too.
Video. The description works the same way once an image-to-video provider is set up. None is published on drupal.org yet.

On a right-to-left language such as Arabic, the Add media form, the Upload | Generate with AI switch, the Options summary and the players are mirrored with the admin theme (Gin and Default Admin).



When Generate With AI Is Missing or Says It Is Not Set Up
See Troubleshooting.
Last updated