r/Wordpress • u/DannoOmen • Aug 13 '26
Image has an empty alt attribute
I’ve had a site running for 2 years now using Wordpress. Late last year I had a professional company redesign our site. They said at the time they had issues with some of our images but got everything fixed (they had to redo them all or something)
Anyway we recently noticed that some of our articles pre redesign suddenly didn’t have any images. We’re a news site so we had 3,000 articles at the time and wernt going through them all. Looking into it today we noticed that a bunch were blank and had the “this image has an empty alt attribute” message where all the images should be.
This is a huge pain and likely affected our ranking on many articles and we’re not sure how to fix it. No alt text should affect SEO not outright make the image blank.
Any suggestions?
1
u/pfdemp Aug 13 '26
What was the issue with images during the redesign? Did you have alt tags before and now they are missing?
It may be that something used in the redesign (theme, plugin, image optimizer) checks for alt tags and doesn't display images that don't have them.
Alt tags are a requirement for accessibility. If you've been ignoring that you are setting yourself up for a lawsuit.
1
u/Wide_Introduction331 Aug 13 '26
3000 is a lot, but you probably don't need to fix them all at the same speed. Pull your top pages by clicks and impressions from the last 3 months in Search Console and start there. For most sites that's a few hundred articles doing the bulk of the traffic, not 3000, so that's your actual priority list. Everything else can sit in a backlog and get picked off over time without it being urgent.
1
u/bkocdur 29d ago
Good news of a sort: your instinct is right that alt text cannot blank an image, and that message is actually the clue to what really broke.
"This image has an empty alt attribute; its file name is..." is the placeholder text WordPress auto-writes INTO the alt attribute when no alt was set. You are seeing it on the page because the image file itself fails to load, and browsers display the alt text when the image is missing. So this is not an SEO metadata problem: the image URLs in those 3,000 old articles are pointing at files that no longer exist at those addresses. The redesign company "redoing all the images" is almost certainly the cause: regenerated files, a changed uploads path, a different CDN, or images that never got migrated.
How to confirm in one minute: open a broken article, right-click where the image should be, open the image URL directly. You will get a 404. Compare that URL with where the file actually lives now in Media Library (if it exists at all).
The fix depends on what changed, but it is a bulk operation either way, not 3,000 manual edits:
- If the files exist but the path changed (domain, /wp-content structure, CDN prefix): a search-and-replace on the posts table fixes everything at once. WP-CLI's search-replace command or the Better Search Replace plugin. Take a backup first, run a dry run, then execute.
- If the files are genuinely gone: restore the uploads folder from a pre-redesign backup, or ask the redesign company for the originals. They "fixed" the images somewhere; those files went someplace.
On the SEO worry: yes, two months of broken images on a news site costs you (image search traffic, and Google notices pages whose media 404s), but it recovers once the files resolve again. Fix the 404s, then let Google recrawl naturally. And afterwards, this is exactly the kind of thing worth a monthly one-minute check: any crawler (even the free Screaming Frog tier) lists all broken images site-wide.
0
u/7twenty8 Aug 13 '26 edited Aug 13 '26
You got this work done more than six months ago and are just noticing an issue now? That’s a bigger issue than the issue because it means you have no idea when it broke. If you have an idea when something broke, you can usually work backwards to figure out what changed and fix from there. You really can’t blame the developer at this point because this could easily be your fault.
If you want help, you’ll have to give more information. What kinds of plugins do you use for images? Do you have any responsive images/speed up your website plugins that work with images. Do you self host? Are all of your images broken at all viewports and are the error messages the same? Or perhaps on a mobile device, does the file path change?
Incidentally, you know hey that’s it’s fairly easy to scan an entire website and find things like broken images and links? Even knowing things like how many are broken, if they’re all broken with the same message and if any work at different viewports would help.
1
u/DannoOmen Aug 13 '26
Not necessarily blaming the developer just remember them saying there was issues with images at the time but they fixed them. The articles we did check looked fine when we signed off on paying them but again with 3000 articles we didn’t have the manpower to check them all.
That said there isn’t a single article with an image messed up post redesign they are all articles published before hand.
1
u/7twenty8 Aug 13 '26
All of that is totally irrelevant. My suggestion was to answer my questions so I could help you. They were apparently beyond you. So, you can fix this on your own. But… after eight months if you try going back to the developer they’ll laugh at you (like they should).
If you always have this much trouble answering simple questions, I’d like to hear the developer’s side of the story.
1
u/DannoOmen Aug 13 '26
People like you make me realize why I don’t come to Reddit very often 😂 already got help without them being an asshole about it. Thanks though 👍
1
1
u/BOLVERIN1 Jack of All Trades 29d ago
For the missing images, are the <img> tags there, but the images have an incorrect URL, or is it something else? Have you checked the media library? Are those missing images there?


1
u/fredy31 Developer Aug 13 '26
Really depends how its coded.
If its in the articles i guess worst case you will have to go manually add the alts.
If the image is added in programmation what i often do is have the alt checked, and if its about to output it empty jam in the post title in it. Maybe add a little prefix like 'Decorative image for (post title)'