[wp-trac] [WordPress Trac] #63818: REST API – /wp/v2/media Returns Inconsistent alt_text in Block Editor
WordPress Trac
noreply at wordpress.org
Tue Aug 12 05:52:58 UTC 2025
#63818: REST API – /wp/v2/media Returns Inconsistent alt_text in Block Editor
---------------------------+-----------------------------
Reporter: rahultank | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 6.8.2
Severity: normal | Keywords: needs-patch
Focuses: accessibility |
---------------------------+-----------------------------
When fetching media items via /wp/v2/media/{id} during block insertion in
the editor, the alt_text property is occasionally returned as an empty
string. This issue occurs especially when the image was inserted into a
post before alt text was updated in the Media Library. The editor
continues to display the old (empty) alt text until the image is removed
and re-inserted.
Steps to Reproduce:
1.Upload an image to the Media Library.
2.Set alt text in the image details.
3.Insert the image into a post via the Gutenberg Image block.
4.Edit the image in the Media Library and change the alt text.
5.Reload the editor and inspect the REST API request to /wp/v2/media/{id}.
Expected Result:
alt_text should always return the current value saved in the Media
Library.
Actual Result:
alt_text sometimes returns an empty string or the outdated value.
Environment:
WordPress version: 6.8.2
REST API version: bundled in core
Theme: Twenty Twenty-Five
Browser: Chrome 126 (Windows/macOS)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63818>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list