Title: Devenia Replace Media
Author: Bjorn Solstad
Published: <strong>Декабрь 18, 2025-ж.</strong>
Last modified: Май 31, 2026-ж.

---

Плагиндерди издөө

![](https://ps.w.org/devenia-replace-media/assets/banner-772x250.png?rev=3423056)

![](https://ps.w.org/devenia-replace-media/assets/icon-256x256.png?rev=3423056)

# Devenia Replace Media

 Автору [Bjorn Solstad](https://profiles.wordpress.org/basicus/)

[Жүктөө](https://downloads.wordpress.org/plugin/devenia-replace-media.1.8.0.zip)

 * [Кенен маалымат](https://ky.wordpress.org/plugins/devenia-replace-media/#description)
 * [Сын-пикирлер](https://ky.wordpress.org/plugins/devenia-replace-media/#reviews)
 *  [Орнотуу](https://ky.wordpress.org/plugins/devenia-replace-media/#installation)
 * [Development](https://ky.wordpress.org/plugins/devenia-replace-media/#developers)

 [Колдоо](https://wordpress.org/support/plugin/devenia-replace-media/)

## Сүрөттөө

**Devenia Replace Media** lets you replace any media file in WordPress while keeping
the original URL intact. Useful for updating images without changing links.

#### Key Features

 * **Keep Your URLs** – Replace the file while keeping the URL, helping avoid broken
   links.
 * **Works Everywhere** – Media Library list view, Elementor gallery editor, and
   standard WordPress media modals.
 * **Preserves Metadata** – Captions, alt text, titles, and descriptions stay intact.
 * **Automatic Cache Busting** – Appends a version parameter after replacement, 
   which can help browsers and CDNs fetch the updated file.
 * **Regenerates Thumbnails** – All image sizes are automatically regenerated after
   replacement.
 * **MCP/Abilities Support** – Agents and automation can replace an existing attachment
   directly instead of uploading duplicates.
 * **Simple Interface** – Just click “Replace File”, upload your new file, done.

#### Where It Works

 * **Media Library** – “Replace File” link appears in the list view actions
 * **Elementor Gallery Editor** – Blue “Replace File” button in attachment details
 * **WordPress Media Modal** – Works in the standard media selector used by Gutenberg
   and Classic Editor

#### Use Cases

 * Update product images without changing URLs
 * Fix typos in PDFs or documents
 * Replace outdated screenshots
 * Update seasonal images across your site
 * Swap placeholder images for final versions

#### Why Cache Busting Matters

When you replace an image, browsers may show an older cached version. This plugin
appends a version parameter to image URLs after replacement to help caches fetch
the updated file.

## Орнотуу

 1. Upload the `devenia-replace-media` folder to `/wp-content/plugins/`
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. That’s it! Look for “Replace File” links in your Media Library

## FAQ.KG

### Will this break my existing links?

The file URL stays the same; only the file content changes.

### Does it work with CDNs?

Often, yes. The cache-busting version parameter can help CDNs serve the updated 
file, but behavior depends on your CDN configuration.

### What file types can I replace?

Any file type that WordPress allows in the Media Library: images (JPG, PNG, GIF,
WebP), documents (PDF, DOC), audio, video, and more.

### Can I replace an image with a different file type?

Yes. For example, you can replace a JPG with a PNG. The URL path stays the same,
but the MIME type is updated.

### Does it preserve my captions and alt text?

Yes. All attachment metadata (title, caption, alt text, description) is preserved.

### I replaced an image but still see the old one. What do I do?

Try a hard refresh (Ctrl+Shift+R or Cmd+Shift+R). The plugin adds cache-busting 
parameters, but your browser may have a very aggressive cache. For images replaced
before installing this plugin, the cache-busting won’t apply.

## Сын-пикирлер

There are no reviews for this plugin.

## Contributors & Developers

“Devenia Replace Media” is open source software. The following people have contributed
to this plugin.

Мүчөлөрү

 *   [ Bjorn Solstad ](https://profiles.wordpress.org/basicus/)

“Devenia Replace Media” has been translated into 1 locale. Thank you to [the translators](https://translate.wordpress.org/projects/wp-plugins/devenia-replace-media/contributors)
for their contributions.

[Translate “Devenia Replace Media” into your language.](https://translate.wordpress.org/projects/wp-plugins/devenia-replace-media)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/devenia-replace-media/),
check out the [SVN repository](https://plugins.svn.wordpress.org/devenia-replace-media/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/devenia-replace-media/)
by [RSS](https://plugins.trac.wordpress.org/log/devenia-replace-media/?limit=100&mode=stop_on_copy&format=rss).

## Өзгөртүүлөр

#### 1.8.0

 * Added: `media/replace-from-url` and `media/replace-base64` abilities for MCP/
   Abilities clients.
 * Improved: Admin replacement flow and automation replacement flow now share the
   same safer staged replace logic.

#### 1.7.5

 * Fixed: Replace File button injection in Media Library grid/details view on newer
   WordPress admin markup
 * Improved: More robust attachment ID detection across WP media frames and DOM
 * Fixed: Media Library grid view details modal now detects attachment ID via `?
   item=<ID>`
 * Improved: Cache busting now also applies to responsive image `srcset` and works
   across repeated replacements
 * Improved: After replacement, Media Library refresh behavior is more reliable
 * Improved: Safer file replacement flow (staged write + rollback) and stricter 
   permissions check

#### 1.7.4

 * Added: Replace File button on Edit Media screen

#### 1.7.3

 * Fixed: Use wp_add_inline_script() and wp_print_inline_script_tag() instead of
   raw script tags
 * Fixed: Added nonce verification for GET requests to replacement page
 * Fixed: Wrapped require_once calls with function_exists checks
 * Fixed: Improved file upload validation with is_uploaded_file(), sanitize_file_name(),
   and sanitize_mime_type()
 * Added: User capability check (upload_files) in replacement function
 * Improved: Better code documentation and WordPress Coding Standards compliance

#### 1.7.2

 * Changed slug to devenia-replace-media (WordPress.org requirement)

#### 1.7.1

 * Fixed text domain to match plugin slug

#### 1.7

 * Fixed nonce verification warnings in file upload handling
 * Improved input validation for WordPress.org Plugin Check compliance
 * Shortened short description to meet 150 character limit

#### 1.6

 * Uses WordPress Filesystem API for all file operations
 * Improved security and WordPress.org compatibility

#### 1.5

 * Added automatic cache busting – URLs now include version parameter after replacement
 * Helps caches fetch updated files without manual cache clearing

#### 1.4

 * Added support for Elementor gallery editor
 * Uses `elementor/editor/footer` hook for proper script loading

#### 1.3

 * Changed script loading method for better compatibility

#### 1.2

 * Improved attachment ID detection in media modals

#### 1.1

 * Added JavaScript injection for media modal support

#### 1.0

 * Initial release
 * Replace files from Media Library list view
 * Preserve metadata and regenerate thumbnails

## Мета

 *  Нуска **1.8.0**
 *  Акыркы жаңыртуу **1 күн мурун**
 *  Активдүү орнотуулар **50+**
 *  WordPress нускасы ** 5.7 же андан жогору **
 *  Tested up to **7.0**
 *  PHP нускасы ** 7.4 же андан жогору **
 *  Тилдер
 * [English (US)](https://wordpress.org/plugins/devenia-replace-media/) жана .[Norwegian (Bokmål)](https://nb.wordpress.org/plugins/devenia-replace-media/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/devenia-replace-media)
 * Тег:
 * [cache busting](https://ky.wordpress.org/plugins/tags/cache-busting/)[elementor](https://ky.wordpress.org/plugins/tags/elementor/)
   [media library](https://ky.wordpress.org/plugins/tags/media-library/)[replace image](https://ky.wordpress.org/plugins/tags/replace-image/)
   [replace media](https://ky.wordpress.org/plugins/tags/replace-media/)
 *  [Advanced View](https://ky.wordpress.org/plugins/devenia-replace-media/advanced/)

## Рейтинг

Азырынча эч кандай сын-пикир жок.

[Your review](https://wordpress.org/support/plugin/devenia-replace-media/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/devenia-replace-media/reviews/)

## Мүчөлөрү

 *   [ Bjorn Solstad ](https://profiles.wordpress.org/basicus/)

## Колдоо

Комментарийлер барбы? Жардам керекпи?

 [Колдоо форумун көрүү](https://wordpress.org/support/plugin/devenia-replace-media/)