這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

WP Media Replace

描述

Many of the WordPress website users fetches the media image in featured image section or content editor to be displayed at front-end. Now, the big headache is if we want to change an image to some new image then we will have to change it in all the posts types where this image has been used.

WP Media Replace solves this headache by managing everything smoothly.

A brief about the logics:

  • Goto to edit more section of a media item and in bottom you will find “Replace Media” section.
  • Upload and new image which will replace the exisiting image in this media item.
  • Suppose you are having an image named as “existing.png” and you want to replace it with “new.png”.
  • Upload “new.png” in “Replace Media” section and click on “Update”.
  • “existing.png” will be moved to “del” folder and “new.png” will be copied and renamed as “existing.png”.
  • Now, you will have to same images with different names “exising.png” and “new.png” to overcome this issue check the box to delete the “new.png” at the time of uploading it.

安裝

This section describes how to install the plugin and get it working.

e.g.

  1. Upload wp-media-replace folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Check the Edit Media page to see the “Replace Media” section working.

常見問題

What happens to original image?

We keep a backup of original image, original image is moved to “del” folder.

What about the the other sizes of the image, are they getting replaced?

Yes, if an image “existing.png” have 2 sizes or more as “existing-150X150.png” and “existing-300X300.png” then these images will also be replaced with the new image and names of the images will be kept same.

What about the database changes, any modifications are done in synchronized image metadatas?

No, overall logic is we are replacing an exsiting image with a new media image, we take the name of original image (all sizes) -> moves the original images to “del” folder -> take the name of new image -> create a copy of new image and name it as original image.

What if my original image is having a “large” size and new image do not have “large” size?

As wordpress default maintains 4 sizes of media images “thumbnail”, “medium”, “medium_large” & “large”. Depending on the aspect ratio of image we uplad the different thumbnail versions are created. If original image is having “large” size but new image have only “thumbnail”, “medium”, “medium_large” then “large” size for the new image will be created by plugin and it will use the fulll size of the image.

評價

2019年4月30日
I can easily replace my images without any changes in URLs. Works like a gem.
閱讀全部2個評價

貢獻者及開發者

“WP Media Replace” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 WP Media Replace 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄