Media Library alt and your posts
You fixed alt text in the Media Library but the page still shows the old one. Why it happens, which images update and how to fix the rest.
You open Media › Library, fill in the alt text for an image, save — and the published post still has an empty or old alt attribute. Nothing is broken. It is how WordPress stores images that are placed inside content, and once you know which images behave this way the fix is quick.
Why it happens
When you insert an image with the block editor’s Image block (or the classic editor’s Add Media button), WordPress copies the alt text from the Media Library into the post’s HTML at that moment. From then on the post has its own copy. Editing the library later changes the library, not the copies already sitting inside posts. This has been discussed for years on the WordPress core tracker (ticket #49165) and is still how it works.
Which images update automatically and which do not
Read from the Media Library every time the page loads
- Featured images printed by your theme.
- WooCommerce product and gallery images.
- Galleries made with the classic
shortcode. - Theme and builder elements that store only the image ID and print it with WordPress’s own image functions — many do, but not all.
Keep their own copy
- Image blocks and Gallery blocks in the block editor (each image in a Gallery block is its own Image block).
- Images inserted in the classic editor.
- Builder modules that save the alt text inside the layout when you pick the image.
Not sure about your builder? Change the alt text of one test image in the library, reload a page that uses it and check with your browser’s Inspect tool.
How to fix images already in posts
One image in the block editor
- Open the post and select the image.
- In the block settings sidebar, edit Alternative text directly — or select Replace in the toolbar, choose Open Media Library and pick the same image again so the block copies the current library alt text.
- Update the post.
Many posts
There is no built-in “sync” button. For a large site you can: go through the posts that matter most (home page, top landing pages, best-selling products) by hand; or have a developer filter the output so empty alt attributes in content are filled from the library when the page is rendered. Avoid database search-and-replace on alt text — the same image can need different alt text on different pages.
Stop it happening for new content
The order matters. If the library already has good alt text when you insert the image, the block copies the good text. So fill in alt text at upload, before the image goes into a post.
That is what automatic generation in ByteKeel PixTag Pro does: alt text is written as soon as the upload finishes, so by the time the Image block appears it already has alt text to copy. With the free ByteKeel PixTag, generate alt text in the Media Library right after uploading, before you insert the image. You can still edit it in the block sidebar, and images your theme prints from the library — featured images, product images — always show the latest library text.
To make sure new images get alt text before you insert them, so the post gets it too, generate it in the Media Library first, or use automatic alt text on upload in ByteKeel PixTag Pro.
Frequently asked questions
Is the alt text in the Media Library used by Google?
Only where it ends up in the page’s HTML. Search engines read the alt attribute on the page, not the library field. That is why the copies inside posts matter.
Can one image have different alt text on different pages?
Yes, and sometimes it should — the same photo can mean different things in different articles. Edit the alt text in each Image block; the library value is just the starting point.
Does bulk-generating alt text fix old posts?
It fixes everything that reads from the library (featured images, product images, shortcode galleries) straight away. Image blocks already in posts keep their own copy and need the block-by-block fix above.
Why does my Image block show alt text that is not in the library?
Someone typed it into the block. The block’s value wins on that page; the library is not changed by editing a block.
Did this answer the question? No — open a support request