Moving a website to a new hosting provider, domain, content management system, or directory structure can cause images to stop displaying correctly. If you are trying to fix broken images after moving a website, the problem usually involves incorrect image URLs, missing files, server permissions, redirects, or changes to the website’s configuration. Fortunately, most image-loading issues can be diagnosed and resolved without rebuilding your website.
Broken images affect more than appearance. They can make pages look unprofessional, interrupt the user experience, and prevent visitors from seeing important product photos, illustrations, or other visual content. For websites that rely on organic traffic, unresolved image problems can also affect image search visibility and the overall quality of a page.
This guide explains how to identify the cause of broken images after a website migration, repair incorrect image paths, check server settings, update database references, and prevent similar problems during future migrations.
Before applying a fix, identify what changed during the migration. An image that worked on the old website may no longer load because its file location, URL, or access permissions have changed.
The most common causes include the following.
Images are loaded through URLs referenced in HTML, CSS, page content, or a content management system’s database. If these URLs still point to the old domain or an outdated directory, the browser may request files from locations that no longer exist.
For example, an image might previously have used:
https://oldsite.com/wp-content/uploads/2025/08/product.jpg
After migration, the correct location might be:
https://newsite.com/wp-content/uploads/2025/08/product.jpg
If the old URL no longer works and no suitable redirect exists, the image may appear broken.
Sometimes, the migration transfers website pages and database records but fails to copy every image file. This can happen when the original uploads directory is excluded from a backup or the transfer stops before completion.
A page may still contain the correct image URL, but the server cannot return the file because it does not exist at the requested location.
A website may move from a root directory to a subdirectory, or its uploads folder may be reorganized during migration. Relative image paths can then point to the wrong location.
For example, images/banner.jpg may work on one page but fail on another if the relative path is interpreted differently.
If the new website uses HTTPS but an image still loads over HTTP, the browser may block the request as mixed content. This is particularly common when older content or CSS files contain hardcoded HTTP image URLs.
Image files can exist on the server but remain inaccessible because of incorrect file permissions, ownership, hotlink protection, security rules, or server configuration.
The browser may receive a 403 Forbidden response instead of the image.
A content delivery network (CDN), caching plugin, or reverse proxy may continue serving outdated image URLs or cached error responses after migration. These issues can make the problem appear inconsistent across devices or browsers.
Use the following steps in order. Start with the image URL and server response before making changes to the database or configuration files.
Open a page containing a missing image and right-click the broken image area. Depending on your browser, select Open Image in New Tab or use the browser’s developer tools to inspect the image element.
Look at the image’s src attribute to find the URL the browser is requesting.
For example:
<img src="https://oldsite.com/images/header.jpg" alt="Website header">
If the image still points to the previous domain, the migration may have left outdated references behind.
You can also open your browser’s developer tools, select the Network tab, and reload the page. Filter the requests by images and inspect the failed request.
Pay attention to the HTTP status code:
Identifying the actual failure helps you avoid changing working files unnecessarily.
If your website has moved to a new domain, search for image URLs that still reference the previous domain.
On WordPress, old URLs may appear in:
For example, if the previous domain was oldsite.com and the new domain is newsite.com, replace outdated references only where the old URL should genuinely change.
For WordPress websites, a reputable search-and-replace tool can help update stored URLs. WP-CLI also provides a search-and-replace command for supported installations.
Before making database changes:
Be careful with serialized database data, which can be damaged by basic text replacement. Use a WordPress-aware tool that handles serialized values correctly.
Also, do not replace every occurrence of the old domain blindly. Some references may belong to external resources or content that should remain unchanged.
If the image URL is correct but returns a 404 error, check whether the file exists on the new server.
Use your hosting control panel’s file manager, SFTP, or SSH to inspect the relevant directory.
For a typical WordPress installation, uploaded media is stored under:
wp-content/uploads/
Files are often organized into year and month folders, such as:
wp-content/uploads/2025/08/
Compare the missing image’s URL with the actual file path. Check the filename, extension, capitalization, and directory structure.
Some servers distinguish between uppercase and lowercase filenames. For example, Product.jpg and product.jpg may be treated as different files.
If the file is missing, restore it from your migration backup or transfer it from the old hosting account. Preserve the original directory structure whenever possible, and confirm that the restored file can be accessed through its public URL.
Do not upload a replacement with a different filename unless you also update every relevant reference.
Relative image paths can break when a website’s directory structure changes.
For example:
<img src="../images/logo.png" alt="Company logo">
The browser resolves this path relative to the current document’s URL. If the page moves to another directory, the same path may point to the wrong location.
Review the affected HTML templates, theme files, and content management system settings. Where appropriate, use a correct absolute URL or a path relative to the site’s root.
For example:
<img src="/images/logo.png" alt="Company logo">
A root-relative path starts from the website’s root directory rather than the current page’s directory. However, if the site operates from a subdirectory, you must account for that configuration.
Also inspect CSS files for references such as background-image: url(...). Background images can break independently of images inserted through HTML.
If the image exists but returns a 403 error, investigate file permissions and ownership.
On many Linux-based hosting environments, directories commonly use permissions such as 755 and files commonly use 644. These are general examples, not universal requirements; your host’s configuration may differ.
Check that:
Avoid setting all files and directories to unrestricted permissions. That can create security risks without solving the underlying problem.
If permissions appear correct, ask your hosting provider to check server logs and ownership settings.
A content management system migration can leave outdated image references in multiple places.
For WordPress, check Settings → General to confirm that the WordPress Address and Site Address are correct. Do not change these values casually if your installation uses a custom configuration.
Next, review the Media Library and open a few affected posts to see whether their images load correctly in the editor.
If the images are missing from the Media Library, confirm that the files were transferred and that attachment records still reference the correct files.
For other platforms, review the equivalent media settings, asset directories, and database references. If the migration involved a new CMS, image paths may need to be mapped to the new platform’s media structure.
After making changes, inspect both old and newly published pages. Fixing one template does not necessarily repair URLs stored in existing content.
If the old image URL redirects to an incorrect destination, update the redirect rules.
For a domain migration, permanent redirects can help visitors and search engines reach the corresponding new pages. However, avoid redirecting every missing image to the homepage. A redirect should lead to the equivalent resource when one exists.
Next, review your CDN configuration.
If you use Cloud flare or another CDN, check that:
Once the underlying issue is fixed, purge the relevant caches in your caching plugin, server, and CDN. Then reload the page in a private browser window.
Clearing the cache before correcting the URL or file path will not fix a genuine missing-file problem.
After installing an SSL certificate or switching to HTTPS, some image URLs may continue to use HTTP.
Open the browser’s developer console and look for mixed-content warnings. Update internal image references to the correct HTTPS URLs when the destination supports HTTPS.
Also confirm that the SSL certificate is valid for the new domain and that the server or CDN is configured correctly.
Do not use broad redirects or automatic URL replacement as a substitute for diagnosing certificate errors. An HTTPS URL can still fail if the certificate is invalid or the server cannot serve the requested resource.
On WordPress websites, themes and plugins can create multiple image sizes from a single original upload. A migration or theme change may leave some generated thumbnails missing.
If the original image loads but a particular thumbnail does not, inspect the image URL and confirm that the requested thumbnail file exists.
If necessary, regenerate thumbnails using a reputable WordPress tool. Make sure the original image files are available first.
Thumbnail regeneration will not restore missing originals, repair incorrect domain references, or resolve permission problems. Use it only when generated image sizes are the actual issue.
After applying fixes, review important pages across the website.
Check:
Use the browser’s Network panel to confirm that image requests return the expected files without errors.
If the website has many pages, consider crawling it with a website auditing tool to identify broken image URLs at scale. Prioritize important landing pages and pages that receive organic traffic.
Broken images can reduce usability, weaken the visual presentation of important pages, and interfere with image discovery. Their SEO impact depends on the context and severity of the problem.
For example, a missing product image may make it harder for shoppers to evaluate an item, while a broken decorative image may have little direct effect on the page’s main purpose.
To protect your website’s search performance after migration:
Google does not guarantee rankings simply because images load correctly. However, repairing broken images helps maintain page quality and ensures that useful visual content remains available to visitors and search engines.
The best approach is to test image assets before and after the migration rather than waiting for visitors to report problems.
These checks help identify missing files and incorrect paths before they become widespread problems.
Images may be missing because the migration did not transfer all media files, image URLs still reference the old domain, directory paths changed, or the new server blocks access. Check the image URL and HTTP status code to identify the cause.
Search for outdated image URLs in your database, page content, theme files, and CSS. Update internal references to the correct domain, verify that the files exist, and configure redirects for resources whose URLs have changed.
A 404 response usually means the requested resource cannot be found at that URL. Confirm the filename, extension, directory structure, and domain. Restore missing files or correct the image reference if the resource exists elsewhere.
Broken images can harm usability and prevent Google from accessing visual content. The impact varies depending on the page and image. Fixing these errors supports a better user experience, but it does not guarantee higher rankings.
Regenerate thumbnails when original images are available but generated image sizes are missing or incompatible with the current theme. It is not necessary for every migration, and it will not repair incorrect URLs or missing original files.
Clearing the cache may resolve outdated CDN responses or cached errors. It will not fix a missing file, incorrect image path, or permission problem. Identify and correct the underlying cause before clearing caches.
Fixing broken images after moving a website starts with identifying why the browser cannot load each image. Check the requested URL, confirm that the file exists, correct outdated domain references, review permissions, and investigate redirects, HTTPS, and CDN settings when necessary.