Title: Replace Content Image Size
Author: Pau Iglesias
Published: <strong>2012 年 5 月 29 日</strong>
Last modified: 2015 年 8 月 31 日

---

搜尋外掛

![](https://ps.w.org/replace-content-image-size/assets/banner-772x250.png?rev=1123182)

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

![](https://ps.w.org/replace-content-image-size/assets/icon-256x256.png?rev=1123182)

# Replace Content Image Size

 由 [Pau Iglesias](https://profiles.wordpress.org/pauiglesias/) 開發

[下載](https://downloads.wordpress.org/plugin/replace-content-image-size.1.2.1.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/replace-content-image-size/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/replace-content-image-size/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/replace-content-image-size/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/replace-content-image-size/#developers)

 [技術支援](https://wordpress.org/support/plugin/replace-content-image-size/)

## 外掛說明

For each image uploaded WordPress generates several versions with different sizes.
These images will be inserted
 in the post content using the visual editor selecting
the right format size for the current theme, so that images can be displayed correctly
in the theme layout avoiding the overflow to the sidebars or another elements.

These images are now part of the content, and are harcoded in posts independently
to any change in the design
 or behavior of the blog.

Therefore, when switching your theme to another theme smaller, or the new theme 
is very big respect the old
 layout, may be these images do not fit perfectly with
the new design.

For these cases the purpose of this plugin is the searching in the post content 
of images with the old image sizes
 (that result bad sizes for the current theme)
and replace it for the right image format: thumbnail, medium, large, full or custom
format size.

The process is simple and consists of three steps. The first step is a form to introduce
the width to find, or the
 period between two widths separated by an hyphen (-) 
with max 100 points of difference. Optionally you can enter a custom post type, 
or leave blank for the ‘post’ post type.

In the next step present the coincidence or multiple coincidences for each post,
with the old html code in grey color,
 and in black the replacement, and also the
new image is displayed. For each item there is a checkbox (by default checked) that
you can uncheck if the result is wrong or an exception.

Finally, at the end of the list, a submit button can perform these changes. Before
this final step, is advisable to
 backup your posts table.

## 螢幕擷圖

 * [[
 * The 2/3 step where you can confirm the changes to make in the posts content.

## 安裝方式

 1. Unzip and upload replace-content-image-size folder to the `/wp-content/plugins/`
    directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Go to menú Tools > Replace Content Image Size and follow the steps.

## 常見問題集

  Is this plugin safe for the content of my posts?

Each post that needs to be altered goes through a process of reconstruction that
fragments in chunks the post content
 (it is splitted based in newline character),
replaces img elements and attributes width and height, and finally implodes to join
the fragments and update the posts table. It is possible that an strange error may
occur, and for this reasons we recommend to backup your posts table before launch
de last step of the replacement process.

## 使用者評論

![](https://secure.gravatar.com/avatar/9ff500b050b071a79bccfdd652d7fe784b985044d0137149c0936a022db53e0c?
s=60&d=retro&r=g)

### 󠀁[Only Plugin that fixed All Images after Theme Switch](https://wordpress.org/support/topic/only-plugin-that-fixed-all-images-after-theme-switch/)󠁿

 [MGitkos](https://profiles.wordpress.org/mgitkos/) 2017 年 11 月 14 日

Thank you for this!!! After switching themes, all my images displayed a blank ‘custom
size,’ showing only the ALT text during the post. Thanks to this plugin, I was able
to convert all images with a width of 1024 to ‘full’ and they’re all good now. Thank
You!

![](https://secure.gravatar.com/avatar/2a6198dd4aff3fd4e796e8611ec3788b95fe7875c1fa37396b759658418cab4c?
s=60&d=retro&r=g)

### 󠀁[Gets the Job Done, Perfectly!](https://wordpress.org/support/topic/gets-the-job-done-perfectly/)󠁿

 [Muhammad Ismail](https://profiles.wordpress.org/warmarks/) 2017 年 1 月 13 日

What a simple and effective plugin to get the job done. I was able to replace old
Image Sizes to the New Image sizes with one click. And before changing the sizes,
it gave me preview for all OLD image html tags and the new tags will be… Thank you
so much for the great plugin! Great work Pau Iglesias!

![](https://secure.gravatar.com/avatar/0da06545d6ab497af0a66dc8ac1a0cf5415c0ad91cecfdbd2a64c000031ab8f6?
s=60&d=retro&r=g)

### 󠀁[Works great!](https://wordpress.org/support/topic/works-great-3185/)󠁿

 [madloki](https://profiles.wordpress.org/madloki/) 2016 年 9 月 3 日

Tested on wordpress 4.5.3 with over 570 articles and it works great! Enormous time
savings!

![](https://secure.gravatar.com/avatar/fb7688b91bf8ab05a490757428cbfc8733c5c054f2dd43955a8ad4e6acead98b?
s=60&d=retro&r=g)

### 󠀁[Fantastic](https://wordpress.org/support/topic/fantastic-1039/)󠁿

 [Laurent OneChai](https://profiles.wordpress.org/lolobu/) 2016 年 9 月 3 日

I’ve changed the size of the image on my theme quite a few time. A few plugin allow
you to resize your image, but you have to edit all your post to replace the image
with the new size. I used to do that directly in the SQL database, but this plugin
provides a much better and simpler alternative. This only improvement that I could
suggest would be to display the image not in their full size which end up larger
than my display size. It would be more convenient if the image was scaled down.

 [ 閱讀全部 9 則使用者評論 ](https://wordpress.org/support/plugin/replace-content-image-size/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈Replace Content Image Size〉的開發相關工作。

參與者

 *   [ Pau Iglesias ](https://profiles.wordpress.org/pauiglesias/)
 *   [ Blogestudio ](https://profiles.wordpress.org/blogestudio/)

[將〈Replace Content Image Size〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/replace-content-image-size)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/replace-content-image-size/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/replace-content-image-size/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/replace-content-image-size/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/replace-content-image-size/)。

## 變更記錄

#### 1.2.1

Release Date: July 15th, 2015

 * Resolving a bug when replacing class attribute value
 * This bug depended on the class attribute relative position
 * The main symptom was lack of closing quotes in class attribute

#### 1.2

Release Date: April 17th, 2015

 * Change $wpdb->escape by esc_url function
 * Success test with custom post types
 * Fix bad scope internal function variable mod_sum
 * Fix post_type hidden form var warning and 3th step
 * Tested code for WordPress 4.2 version.

#### 1.1

Release Date: March 28th, 2015

 * Tested code for WordPress 4.1.1 version.
 * Some warnings on undefined variables fixed.
 * Defered load plugin textdomain to plugin admin section (improve performance).
 * Added style to submit buttons.
 * Fix PHP strict warnings and set properly scope of class methods.
 * Fix class size-[alias] of html img code.
 * Added clean_post_cache when update post.
 * Change strpos by stripos when needed.

#### 1.0

Release Date: May 29th, 2012

 * First and tested released for WordPress 3.3.2

## 中繼資料

 *  版本 **1.2.1**
 *  最後更新 **11 年前**
 *  啟用安裝數 **90+**
 *  WordPress 版本需求 ** 3.3.2 或更新版本 **
 *  已測試相容的 WordPress 版本 **4.3.34**
 *  語言
 * [English (US)](https://wordpress.org/plugins/replace-content-image-size/)
 * 標籤:
 * [content](https://tw.wordpress.org/plugins/tags/content/)[image](https://tw.wordpress.org/plugins/tags/image/)
   [resize](https://tw.wordpress.org/plugins/tags/resize/)[size](https://tw.wordpress.org/plugins/tags/size/)
   [sizes](https://tw.wordpress.org/plugins/tags/sizes/)
 *  [進階檢視](https://tw.wordpress.org/plugins/replace-content-image-size/advanced/)

## 評分

 4.6 星，滿分為 5 星

 *  [  8 個 5 星使用者評論     ](https://wordpress.org/support/plugin/replace-content-image-size/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/replace-content-image-size/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/replace-content-image-size/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/replace-content-image-size/reviews/?filter=2)
 *  [  1 個 1 星使用者評論     ](https://wordpress.org/support/plugin/replace-content-image-size/reviews/?filter=1)

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

[查看全部使用者評論](https://wordpress.org/support/plugin/replace-content-image-size/reviews/)

## 參與者

 *   [ Pau Iglesias ](https://profiles.wordpress.org/pauiglesias/)
 *   [ Blogestudio ](https://profiles.wordpress.org/blogestudio/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/replace-content-image-size/)