manifest / performance / replace-thumbnail-url
Replace Thumbnail URL
Wordpress plugin to replaces the site URL with a custom one in attachment image URLs
by Mohamed Abidar · github.com/abidarm/replace-thumbnail-url · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/abidarm/replace-thumbnail-url/archive/refs/heads/main.zipFrom the readme
Replace Thumbnail URL
WordPress plugin that rewrites attachment image URLs to use a custom domain (for example a CDN or public site URL) instead of the current site URL.
Works as a standard plugin or as a must-use (mu) plugin.
Requirements
| Requirement | Version |
|-------------|---------|
| WordPress | 5.0 or higher |
| PHP | 7.4 or higher |
Features
- Rewrites domains in attachment URLs (wpgetattachmenturl)
- Rewrites sized image src values (wpgetattachmentimagesrc / related helpers)
- Rewrites srcset URLs (wpcalculateimagesrcset)
- Settings field under Settings → Media to set the custom media domain
- Defaults to the current site URL (no rewrite) until you change it
Installation
Standard plugin
1. Copy the replace-thumbnail-url folder into wp-content/plugins/.
2. In Plugins, activate Replace Thumbnail URL.
3. Go to Settings → Media and set Custom media domain if needed.
Must-use (mu) plugin
Must-use plugins load automatically and cannot be deactivated from the admin UI.
WordPress only autoloads PHP files directly in wp-content/mu-plugins/ (not in subfolders).
Option A — single file
1. Copy replace-thumbnail-url.php into wp-content/mu-plugins/.
2. Done. T
Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| 1.2 | Jul 18, 2026 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.