The Replace Image plugin adds a button to the Attachment Details screen which allows you to upload or select an image to replace the current image while retaining the URL and attachment ID. This allows you to easily swap in an updated version of an image without having to re-select it in theme settings pages, post/page content, or anywhere else where it might be referenced.
Important: Disable your browser’s cache and any WordPress caching plugins before use; otherwise, the plugin may appear not to work. See Tools > Replace Image for instructions.
- Click “Plugins” > “Add New” in the WordPress admin menu.
- Search for “Replace Image”.
- Click “Install Now”.
- Click “Activate Plugin”.
Alternatively, you can manually upload the plugin to your wp-content/plugins directory.
I tried to replace an image but nothing happened.
Your browser is likely still caching the old image. Try doing a hard refresh (Ctrl + F5 on Windows, Apple + R / Command + R on Mac) while viewing the page on the frontend. Note that the backend seems to retain cached image thumbnails even after a hard refresh.
Contributors & Developers
“Ganti Imej” adalah perisian sumber terbuka. Orang-orang berikut telah menyumbang kepada pemalam ini.Penyumbang
- Updated links, author, changed branding to Aspen Grove Studios
- Updated tested up to
- Removed donation links,
- Added aspengrovestudios as contributor
- Updated banner and icon
- Plugin now deletes files associated with the old image prior to replacement
- Fixed non-critical PHP warning
- Fixed undefined offset error per https://wordpress.org/support/topic/undefined-index-0-on-line-100-mainfile?replies=1
- Added support for image replacement where the image file being replaced doesn’t exist
- Removed anonymous functions
- Added functionality to prevent image caching in the Media Library
- Fixed a bug where the upload UI would temporarily stop working properly after replacing an image.
- Initial release