Broken images after a website move: find and fix them
Short answer: Broken images after a website move usually come from one of four things: image and PDF links in old content still point to the old domain or old folder structure, the files weren't copied, file names changed case or format on the new server, or old image URLs weren't redirected. Crawl the new site to list every broken image and file link, copy missing files, update URLs in the content database with a careful search-and-replace, and redirect old image and document URLs to their new locations. Google's site-move guidance specifically says to include images, videos and other embedded files in your move plan.
Why images break during a move
Pages get attention in migration plans; the files embedded in them often don't. Google's guide to site moves with URL changes advises transferring images and downloads such as PDFs, because they may already get traffic from search or links, and says to include URLs of embedded content, such as videos, images, JavaScript and CSS, in your plans. These URLs need to be moved the same way as all other content.
Common causes:
| Cause | Typical sign |
|---|---|
| Hard-coded old domain in content | Images load from old-domain.co.nz until it's switched off, then break |
| Files not copied | 404 for some or all uploads |
| Different folder structure in the new CMS | Old /wp-content/uploads/2021/05/ paths don't exist |
| Case sensitivity | Photo.JPG worked on the old server, photo.jpg is requested on the new one |
| Format conversion | Images converted to WebP but content still references JPG |
| HTTP image links on an HTTPS site | Browsers block or warn on mixed content |
| CDN or image service not configured | Images point to a CDN hostname that no longer exists |
The first one is sneaky: everything looks fine on launch day because the old site is still running. The images break weeks later, when the old hosting is cancelled.
Step 1: List broken images and files
- Crawl the new site with a website crawler that reports broken images and links, including PDFs and other downloads.
- Search the content database for the old domain name and old upload paths.
- Check server logs or Search Console for 404s on image and PDF URLs.
- Look at pages in a browser with developer tools open; the Network tab shows failed image requests.
Step 2: Copy missing files
Compare the old and new upload folders. Copy anything missing, keeping names and structure if possible. If the old hosting is already gone, check backups, your CMS's export, a local copy held by your agency, or original photos from staff.
Step 3: Update URLs in content
Old URLs live inside page content, product descriptions, widgets and theme settings. Fix them with a search-and-replace tool designed for your CMS:
- Back up the database first.
- Replace
https://old-domain.co.nz/withhttps://new-domain.co.nz/or, better, with relative paths if your CMS supports them. - Use a tool that handles serialised data correctly, so settings don't break.
- Test on a staging copy before running on the live site.
Also update theme files, emails and PDFs that embed image links.
Step 4: Redirect old image and document URLs
Images and PDFs are linked from other websites, emails, social posts and Google Images. Google's guide recommends a mapping of old to new URLs and permanent redirects, noting that 301 and other permanent redirects don't cause a loss in PageRank. Redirect:
- old upload paths to new ones, using a pattern rule if the structure changed predictably;
- old domain image URLs to the new domain;
- important PDFs individually.
Step 5: Fix case and format issues
- Standardise file names to lowercase and update references.
- If you converted formats, either keep the originals available or update references and redirect.
- Make sure every
<img>has a workingsrc. Google's image guidance recommends always specifying a fallback URL insrc, even when usingsrcsetor<picture>.
Step 6: Check images are still findable
Google's image guidance notes it finds images in the src attribute of <img> elements and doesn't index CSS background images, and that you can submit an image sitemap for images it might not otherwise discover. After a migration, check that important product images are real <img> elements with descriptive alt text.
Don't forget files outside the CMS
Images and documents live in more places than the content database. Check email templates and newsletters, which often embed images from your website; marketplace and social listings that pull product photos from your site; printed QR codes and brochures that link to PDFs; and third-party tools such as booking widgets or review platforms that reference your logo. Each of these may still point at old paths. List them during planning and test them after launch, because nothing on your own site will warn you when an image in last month's newsletter goes blank.
Plan the old hosting's end date
Keep the old hosting running, read-only if possible, until you've confirmed that no page, email or feed still loads anything from it. A crawl showing zero requests to the old domain is a good signal that it's safe to switch off.
An illustrative example
A hypothetical Nelson outdoor gear shop moved from one platform to another and changed its domain. Three weeks after launch, the old hosting was cancelled and hundreds of blog images disappeared. The content still referenced the old domain. The developer restored the files from the old platform's export, ran a search-and-replace to the new domain on a staging copy and then live, added a pattern redirect from the old upload paths, and re-crawled the site to confirm no broken images remained.
FAQ
Why did images work at launch?
They were still loading from the old site. They broke when it was switched off.
Do I need to redirect every image?
Prioritise images and PDFs that get traffic or links; pattern rules can cover the rest.
Will Google Images update automatically?
It recrawls over time. Redirects help it find new locations.
Should I keep the old domain?
Yes, keep it registered and redirecting for a long time.
If your site lost images or downloads after a move, send us the old and new addresses.