You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating an image via the media modal, the prompt is added as the Alternative Text field and a hyphenated version is set for the Title field. However when generating via the Block Inserter > Media > Generate images flow we're not properly putting the prompt into the Alternative Text field or setting that as the hyphenated version in the Title field.
Steps to Reproduce
See above
Screenshots, screen recording, code snippet
Block Inserter > Media > Generate images:
Generated image in Media Library showing no Alternative Text and generic Title:
Environment information
Device: Mac mini 2018
OS: macOS Sonoma 14.3.1
Browser: Firefox 122.0.1
WordPress information
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
@dkotter I couldn't find a way to fix this. Via the media modal, we set the file name which is used as the title and the alt text, but via the Block inserter > Generate images, the file name is set to image.png by core. This behaviour is consistent with Openverse as well.
The fields above are used when inserting the image block, but they are not submitted to the server-side when creating an attachment. Not sure if this is intentional by WP Core, do you suggest we raise a ticket?
Yeah, I spent a little time looking at this when the issue was first opened and basically came to the same conclusion. Seems we're doing what we're supposed to here but Core isn't using the values we supply when the image is actually imported (it uses the title and alt text when rendering the preview image only).
I'd suggest seeing if there's an open issue in the Gutenberg repo (knowing it's not always easy finding things with the amount of issues there) and if there isn't an open one, we can open a new one.
Describe the bug
When generating an image via the media modal, the prompt is added as the
Alternative Text
field and a hyphenated version is set for theTitle
field. However when generating via theBlock Inserter > Media > Generate images
flow we're not properly putting the prompt into theAlternative Text
field or setting that as the hyphenated version in theTitle
field.Steps to Reproduce
See above
Screenshots, screen recording, code snippet
Block Inserter > Media > Generate images:
Generated image in Media Library showing no
Alternative Text
and genericTitle
:Environment information
Device: Mac mini 2018
OS: macOS Sonoma 14.3.1
Browser: Firefox 122.0.1
WordPress information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: