-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block Inserter > Media > Generate images does not add alt text or title #729
Comments
@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 classifai/src/js/gutenberg-plugins/inserter-media-category.js Lines 72 to 77 in 77b529e
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. |
Opened an upstream feature request - WordPress/gutenberg#60378 |
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: