Description
Media Ranger scans your posts, pages, and custom post types for images hosted on external domains. It then downloads those images to your WordPress Media Library and automatically replaces the external URLs with local ones.
This is especially useful when:
- Migrating content from another platform (Webflow, Squarespace, etc.)
- Consolidating images from multiple CDNs
- Ensuring all your media is hosted locally for better control
- Improving site performance by serving images from your own server or CDN
Features:
- Scan posts, pages, and any custom post type
- Filter by post status (published, draft, any)
- Process in batches to avoid timeouts
- Include/exclude specific external hosts
- Detect images in
src,data-src,srcset, and<source>elements - Automatic deduplication (won’t re-import already imported images)
- Optional: prefer original image size over thumbnails
- Dry run mode to preview changes without modifying anything
- REST API endpoint for programmatic access
- Full WPML and Polylang compatibility
- Support for modern image formats (WebP, AVIF)
SUPPORT
Need help or have a suggestion?
Please use the official WordPress.org Support Forum for any issues related to the plugin.
Official Website
For additional information or to get in touch with the development team, please visit our official website.
Like the plugin?
Please leave a 5-star review and help others discover Media Ranger.
ABOUT BUBUKU_CODE
We develop custom solutions for WordPress focused on performance, accessibility, and maintainable code. Our work includes plugins, themes, and integrations designed to improve the daily workflow of marketing and content teams.
Installation
- Upload the
media-rangerfolder to/wp-content/plugins/ - Activate the plugin through the ‘Plugins’ menu in WordPress
- Go to Tools Media Ranger
FAQ
-
Does this modify my original posts?
-
Yes, when not in dry-run mode, the plugin updates your post content to replace external image URLs with local ones. The original external images remain untouched on their servers.
-
What happens if an image fails to download?
-
The plugin logs the error and continues processing other images. Failed downloads are reported in the results.
-
Can I use this with WooCommerce products?
-
Yes! Simply include “product” in the Post Types field to scan WooCommerce products.
-
Does it work with WPML or Polylang?
-
Yes, the plugin is fully compatible with both WPML and Polylang. You can process all languages at once or select a specific language.
-
How do I avoid re-importing the same image?
-
The plugin stores the original source URL as attachment metadata. When scanning, it checks if an image was already imported and reuses the existing attachment.
-
Can I run this via WP-CLI or programmatically?
-
Yes, you can use the REST API endpoint. See the documentation for details on how to call
/wp-json/media-ranger/v1/run. -
How does the plugin protect against unsafe downloads?
-
Before downloading any remote image, the plugin rejects URLs that don’t use the
httporhttpsscheme, and performs a HEAD request that blocks requests to private/internal network addresses (viawp_safe_remote_head()). It also checks theContent-Type(must be an image) and theContent-Length(default max 20 MB) before downloading. These can be adjusted with themran_allowed_mime_prefixesandmran_max_download_sizefilters, and theMRAN_HTTP_TIMEOUTconstant (default 10 seconds, define it inwp-config.php).
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Media Ranger” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Media Ranger” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.2
- Added plugin icons, banners, and screenshots for the WordPress.org assets directory
1.0.1
- Security: reject non-http(s) URLs before making any request
- Security: use wp_safe_remote_head() to prevent requests to internal/private network addresses
- Security: validate Content-Type and enforce a maximum download size (20 MB default, filterable) before downloading
- Security: configurable HTTP timeout via MR_HTTP_TIMEOUT constant
1.0.0
- Complete rewrite following WordPress Coding Standards
- Added namespace support and modular architecture
- Improved WPML/Polylang compatibility
- Added scan-only endpoint
- Enhanced error handling and reporting
- Added verbose mode for debugging
- Better deduplication using attachment metadata
- Initial release


