Troubleshooting · Troubleshooting
How to Fix Images Not Showing in WordPress
Short answer
Images stop showing in WordPress when the browser cannot reach the file, usually because the address is wrong after a move, the page loads an HTTP image on an HTTPS site, the server blocks the file, or the resized copy was never made. Check the failed request in your browser developer tools first, then fix the address, the permissions, or the thumbnails, and confirm the image loads on the live page.
Key takeaways
- A 404 means the image file or its path is missing, while a 403 means the server refuses to serve a file that exists.
- Mixed content hides images when an HTTPS page still asks for an HTTP image, so both site addresses must use HTTPS.
- WordPress folders should use 755 and files 644; no folder should ever use 777, not even the uploads folder.
- New image sizes only apply to new uploads, so older images need their thumbnails rebuilt after a theme change.
- Cloudflare Flexible mode leaves the link between Cloudflare and your server on plain HTTP, which can cause mixed content.
- Purge the CDN and page cache after a fix, or visitors may keep seeing the old broken copy.
What does “images not showing” mean in WordPress?
An image is not showing when the page loads but the picture is missing, blank, or replaced by a broken-image icon.
WordPress stores each upload under wp-content/uploads, in folders by year and month, and the Media Library keeps a record of each file. When the record, the file, or the address disagree, the browser has nothing to draw.
You may see one of these signs:
- A broken-image icon where the picture should be.
- A blank space with no icon at all.
- The image shows in the editor but not on the live page.
- The image shows on one page but not on another.
Each sign points to a different cause, so note which one you see before you change anything.
How do you find out why an image is not showing?
Open the broken page, open your browser developer tools, and read the status code of the failed image request, because the code names the cause.
- Open the page in Chrome or Firefox and press F12 to open developer tools.
- Open the Network tab, filter by Img, and reload the page.
- Click the failed image request and read its status code.
- Right-click the broken image and choose “Open image in new tab” to see its full address.
| Status | Meaning | Check first |
|---|---|---|
| 404 | The file or path was not found | The uploads folder and the image address |
| 403 | The server refuses to serve the file | File permissions and server rules |
| 200, but blank | The file downloads but will not draw | A corrupt file or an unsupported format |
| Mixed content warning | An HTTPS page asked for an HTTP image | The image address and the site address |
If the address in the new tab does not match the file in your Media Library, the stored address is wrong.
If you see a 404 for a post image after a move, the cause is often the same kind of stale address covered in our guide to fixing broken links after migration.
Why do images break after a move or domain change?
Images break after a move because posts still hold the old domain or address, so the browser asks the old site for files that are no longer there.
WordPress stores two addresses: the WordPress Address (siteurl), where the core files live, and the Site Address (home), the address visitors type.
Both appear in “Settings → General”. The WordPress wp-config guide notes that WP_HOME and WP_SITEURL can define these values, and each value should include the https:// part (Editing wp-config.php).
Fix the addresses in this order:
- Open “Settings → General” and check that both addresses match the live site, including
https://. - Save, then log in again at the new address if WordPress asks you to.
- Run a search and replace from the old address to the new one, with WP-CLI (
wp search-replace) or a search-replace plugin. - Back up the database before you run the replacement.
Changing the two addresses does not rewrite links already saved in posts, so images stay broken until the old addresses in content are replaced. That is why the search-replace step matters, and why a plain text edit of one post will not fix the rest of the site.
How do you fix mixed content that hides images?
Mixed content means a secure HTTPS page loads an image over plain HTTP, so the browser upgrades the request to HTTPS or blocks it, and the image never appears.
Google's web.dev guide defines mixed content as a page whose HTML loads over HTTPS while resources such as images load over HTTP (What is mixed content?).
MDN adds that browsers auto-upgrade image, video, and audio requests to HTTPS, and block insecure requests for other resource types (Mixed content).
Fix the stored addresses in this order:
- Open “Settings → General” and make sure both addresses start with
https://. - Search and replace any
http://version of your own domain with thehttps://version in the database. - Open the page, press F12, and look in the Console or Issues tab for the
http://image addresses. - For an image hosted elsewhere, check whether it loads at an
https://address; if not, host it yourself or drop it.
The web.dev fixing guide notes that if a resource is not available over HTTPS, you should host it yourself, use another host, or remove it (Fixing mixed content).
A Content-Security-Policy header with upgrade-insecure-requests can upgrade requests as a safety net, but it is not a fix for the stored http:// addresses. Clean the addresses first.
How do you fix file permissions that block images?
Fix file permissions by setting folders to 755 and files to 644 under wp-content/uploads, because a 403 error means the server will not hand the file to the browser.
WordPress.org's file permissions guide gives 755 for folders and 644 for files as the usual scheme on shared hosting, and it warns that no directory should ever be given 777, even upload directories (Changing File Permissions).
- Open your hosting file manager or FTP client and go to
wp-content/uploads. - Check the folder permission; it should be 755, and image files should be 644.
- Fix the numbers on the uploads folder and its files only, not the whole site.
- Reload the broken image in a new tab to see whether the 403 is gone.
If the numbers are already right and the 403 stays, the cause is usually file ownership, not the numbers. Ask your host to check who owns the files and which account the web server runs as.
Never use 777 as a shortcut. It makes the folder writable by every account on the server, and WordPress.org's guide warns against it for that reason.
Why do some images show but their resized copies do not?
Resized copies fail when the size the page asks for was never made, often after a theme change or a move, while the full-size original still loads.
WordPress makes several copies of each upload at upload time. The developer reference lists the reserved size names as thumbnail, medium, medium_large, large, and post-thumbnail (add_image_size()).
New sizes only apply to images uploaded after the size was added. Older images keep their old set of copies until you rebuild them.
That is why a new theme can break images that loaded fine before. Our guide to sizing images in WordPress explains how the size choice affects the file the page asks for.
WordPress also scales down any image larger than 2560 pixels on its longest side when it is uploaded, under the big_image_size_threshold setting (big_image_size_threshold). That scaled copy becomes the “full size” file, so a very large original is not what the page serves.
Rebuild the missing sizes with one of these methods:
- Install the Regenerate Thumbnails plugin from WordPress.org, then use its screen under Tools to rebuild the sizes for the affected images (Regenerate Thumbnails).
- With WP-CLI, run
wp media regenerate --yesfor the whole library, orwp media regenerate --only-missingfor missing sizes only. The WP-CLI reference shows both forms, plus regenerating single attachments by ID (wp media regenerate).
How do you fix images that break only when a CDN or cache serves them?
When a CDN or cache serves a stale copy, purge that cache after you fix the file, because the old 404 or old address can outlive the repair.
- Purge the cache in your CDN dashboard, then purge your caching plugin, then hard-refresh the page.
- Check the same image address in a private window to skip your browser cache.
- If the image still fails, open its direct address; a 404 there means the file itself is missing, not the cache.
If the cache is fine and the image still fails, check how your CDN handles HTTPS. Our guide to changes not showing on your site covers stale cache checks step by step.
Cloudflare's docs explain that Flexible mode encrypts the link between the visitor and Cloudflare, but connects to your origin over plain HTTP, and no certificate is needed on the origin (Flexible).
That split can feed mixed content and redirect loops, so Cloudflare recommends Full or Full (Strict) for sites that handle logins or personal data.
Our Cloudflare setup guide for WordPress walks through the settings that keep the origin and the CDN in agreement.
How do you find a plugin or theme that breaks images?
Find the culprit by turning off plugins in groups and switching to a default theme, then checking the same page after each change.
- Back up the site, then deactivate all plugins and reload the broken page.
- If the image returns, reactivate plugins in small groups until it breaks again.
- Switch to a default theme that ships with WordPress and reload the page to test the theme.
- Check image optimization and lazy-load plugins first, since they rewrite image addresses.
If the image loads with plugins off but breaks when one group returns, the problem plugin is in that last group. Turn that group off one by one to pin it down.
How do you check that the fix worked?
Check the fix by loading the page in a private browser window and confirming every image draws, with no failed image requests in the Network tab.
- Open the page in a private window and hard-refresh it.
- Open the Media Library and confirm the thumbnails load for the fixed images.
- Open the Network tab, filter by Img, and confirm each image returns 200.
- Check a second page that uses the same images.
If one image still fails while the rest load, copy its address from the page and compare it with the file in the Media Library. The one that fails has its own wrong address or missing file.
When should you contact your host?
Contact your host when the file is on the server, the address is right, and the image still returns 403 or 500, because only the host can see server rules and logs.
Ask the host about these cases:
- A 403 that stays after you set folders to 755 and files to 644.
- A 500 error when you open the image address directly.
- Images failing right after a server move or a hosting change.
- Disk space full, so new uploads or resized copies cannot be written.
- A firewall or hotlink rule that blocks image requests.
Give the host the exact image address, the status code, and the time you saw it. That is enough for them to find the matching lines in the server error log.
What mistakes should you avoid?
Avoid shortcuts that hide the cause, because each one below makes the next fix harder.
- Setting any folder or file to 777 to “fix” a 403.
- Deleting the original image when only a resized copy is missing.
- Editing the database by hand without a backup.
- Fixing one page when the address is wrong across the whole site.
- Clearing only the browser cache while the CDN still serves the old copy.
- Uploading the same image again under a new name instead of fixing the stored address.
- Changing image sizes in “Settings → Media” and expecting old images to change too.
Frequently asked questions
Why do my images show in the editor but not on the live site?
The editor can show a preview from a different address or a cached copy, while the live page uses the address stored in the post. Check that stored address, look for mixed content warnings, and clear the page cache. If the live address points to an old domain or an HTTP address, fix it with a search and replace.
Can a plugin make images disappear?
Yes. Image optimization, lazy-load, and security plugins can rewrite image addresses or block image requests. Deactivate all plugins, check the page, then reactivate them in small groups until the image breaks again. The plugin in the last group is the likely cause, and its settings or an update may need attention.
Do I need to re-upload an image if its thumbnail is broken?
No, re-uploading is not needed when the original file is still on the server. Use the Regenerate Thumbnails plugin or the WP-CLI command wp media regenerate to rebuild the missing sizes from the original. Only re-upload if the original file itself is gone from the uploads folder.
Why are only some images broken on my site?
Each broken image usually has its own cause: a wrong address, a missing resized copy, or an external HTTP source. Images uploaded before a theme change or a move are the most likely to fail. Check the failed address for each image in the browser developer tools instead of treating the whole site as one problem.
Will changing my site address fix broken images?
It helps only if the address is the cause. Changing the WordPress Address and Site Address in Settings General fixes new image addresses, but links already saved in posts keep the old address. Run a search and replace from the old address to the new one, back up first, and then clear every cache.
How long does an image fix take to show on the site?
Most fixes show at once after you hard-refresh the page, but a CDN or caching plugin can keep serving the old broken copy for minutes. Purge the CDN cache and the page cache, then check the page in a private window. If the image still fails there, the file or address is still wrong.
Sources
- Changing File Permissions WordPress.org
- What is mixed content? web.dev
- Fixing mixed content web.dev
- Mixed content MDN Web Docs
- Flexible - SSL/TLS encryption modes Cloudflare Docs
- wp media regenerate Developer.WordPress.org
- add_image_size() Developer.WordPress.org
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
