Prevent duplicate image URLs after changing your uploads path by redirecting old image paths to new ones with WP Ghost. When you change the uploads path, your images get a new URL. But the old URL might still work too. That means the same image is accessible at two different addresses – and search engines treat that as duplicate content. This tutorial shows you how to redirect old paths to new ones in two steps.
Why Image Path Redirects Matter
After changing your uploads path from /wp-content/uploads/ to a custom name like /storage/, your images are accessible through the new path. But depending on your server configuration, the original /wp-content/uploads/ path might still serve the same files. That creates a problem.

Duplicate URLs hurt SEO. When Google finds the same image at /wp-content/uploads/2025/03/photo.jpg and /storage/2025/03/photo.jpg, it has to decide which URL is canonical. That dilutes your page’s SEO signals and can result in the wrong URL being indexed. Worse, if external sites link to your old image URLs, that link equity goes to a path you’re trying to hide.
Old paths leak your WordPress structure. If the old /wp-content/uploads/ path still works, bots and theme detectors can still confirm WordPress through image URLs. The entire point of changing the uploads path is to eliminate this fingerprint. Leaving the old path active undermines that protection.
External links shouldn’t break. Other websites, social media posts, and email newsletters may link to your images using the old /wp-content/uploads/ URLs. Rather than returning a 404 (which breaks the link) or serving the image at two URLs (which creates duplicates), a redirect sends visitors to the new path seamlessly. The image loads. The link works. WordPress is hidden.
How to Redirect Old Image Paths with WP Ghost
Two steps. First set the new uploads path, then redirect media files from the old path to the new one.
- Set a custom uploads path. Go to WP Ghost > Change Paths > WP Core Security. In the Custom Uploads Path field, enter a directory name (like “storage”). Click Save.

- Enable the media file redirect. In the same WP Core Security tab, enable Hide WordPress Common Paths. Then under Hide File Extensions, select MEDIA Files from the list. Click Save.

With this configuration, any request for images through the old /wp-content/uploads/ path is redirected to the new custom path. One image. One URL. No duplicates.
What Happens After You Enable the Redirect
Old image URLs redirect to new ones. A request to /wp-content/uploads/2025/03/photo.jpg automatically redirects to /storage/2025/03/photo.jpg (or whatever your custom path is). The image loads at the new URL. The old URL is no longer a standalone resource.
External links keep working. Any site, social media post, or email that links to your old image URLs will still display the image correctly. Visitors are redirected transparently and won’t notice a thing.
Google consolidates to the new URL. Over time, as Google encounters the redirects, it updates its index to use the new image URLs. To speed this up, resubmit your sitemap in Google Search Console after making the change.
WordPress fingerprints are eliminated. Since the old /wp-content/uploads/ path no longer serves images directly, bots can’t confirm WordPress through image URL patterns. Combined with changing the wp-content path, your entire upload directory structure becomes invisible.
To completely block the old image paths instead of redirecting (returning a 404 instead of a redirect), see the Hide the Old Image Paths tutorial.
Frequently Asked Questions
What’s the difference between redirecting and hiding old image paths?
Redirecting sends requests from the old URL to the new one – the image still loads, just at the new address. This preserves external links and avoids broken images. Hiding (covered in the Hide Old Image Paths tutorial) returns a 404 for the old URL – the image doesn’t load at the old address at all. Use redirects when external sites link to your images. Use hiding when you want maximum security and don’t care about old links breaking.
Will this help or hurt my image SEO?
It helps. Duplicate image URLs dilute SEO signals. By redirecting old paths to new ones, you consolidate all image authority to a single URL. Resubmit your sitemap in Search Console to accelerate Google’s re-indexing of the new image URLs.
Does this work with CDNs?
Yes, but make sure your CDN is configured to serve from the new path. If your CDN still caches images under the old /wp-content/uploads/ path, purge the CDN cache after making the change. See the CDN URL Mapping tutorial for configuration details.
Does this work with WooCommerce product images?
Yes. WooCommerce product images live in wp-content/uploads/ like all WordPress media. The redirect applies to all media files in the uploads directory, including product images, gallery thumbnails, and downloadable files. WP Ghost is fully compatible with WooCommerce.
Does WP Ghost physically move my images?
No. WP Ghost never moves, renames, or modifies any file. Your images stay in wp-content/uploads/. The redirect is handled through URL rewrite rules. Deactivating WP Ghost restores the original paths instantly.
Related Tutorials
- Change the Uploads Path – Set the custom uploads directory that old paths redirect to.
- Hide the Old Image Paths – Block old image URLs entirely (404) instead of redirecting.
- Change the wp-content Path – Rename the parent directory of uploads, plugins, and themes.
- Hide WordPress Common Paths and Files – Block access to default WordPress directories.
- CDN URL Mapping – Configure CDN paths to work with custom upload URLs.
