Title: 404 Image Redirection (Replace Broken Images)
Author: wp-buy
Published: <strong>2021 年 12 月 8 日</strong>
Last modified: 2026 年 5 月 9 日

---

搜尋外掛

![](https://ps.w.org/broken-images-redirection/assets/banner-772x250.png?rev=3527029)

![](https://ps.w.org/broken-images-redirection/assets/icon-256x256.png?rev=2643830)

# 404 Image Redirection (Replace Broken Images)

 由 [wp-buy](https://profiles.wordpress.org/wp-buy/) 開發

[下載](https://downloads.wordpress.org/plugin/broken-images-redirection.zip)

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

 [技術支援](https://wordpress.org/support/plugin/broken-images-redirection/)

## 外掛說明

**404 Image Redirection (Replace Broken Images)** prevents broken image icons from
appearing on your WordPress site. When a visitor requests an image that no longer
exists, the plugin either serves a default replacement image or removes the broken
image from the page entirely — your choice.

#### Why this plugin?

Broken images hurt your site:
 * They damage user experience — visitors lose trust
instantly * They hurt your SEO — search engines penalize 404 errors * They look 
unprofessional — especially on product and content pages

#### Key Features

 * **Replace broken images** with a default image of your choice
 * **Hide broken images entirely** — JavaScript removes them from the DOM along 
   with their links and captions
 * **Custom redirection rules** — map specific broken image URLs to specific replacement
   images
 * **Server-level performance on Apache** — uses a small `.htaccess` rule, zero 
   PHP overhead per request
 * **PHP fallback for Nginx and LiteSpeed** — works on any host, even if `.htaccess`
   is unavailable
 * **Clean uninstall** — removes only what the plugin added, never touches WordPress
   or other plugins’ rules
 * **Master kill switch** — when you toggle the plugin off, it truly stops working

#### How it works

On Apache servers, the plugin writes a small rewrite rule to your `wp-content/.htaccess`
file. When a visitor requests a missing image, your server serves the replacement
image instead of returning a 404. This is fast (no PHP execution per image) and 
SEO-friendly (the response is a real 200 OK with a real image).

On Nginx, LiteSpeed, or hosts with a non-writable `.htaccess`, the plugin automatically
falls back to a PHP-based handler that does the same job via WordPress’s `template_redirect`
hook.

#### Two display modes

**1. Replace mode (default):** Show your chosen default image whenever a broken 
image is requested. Best for visual consistency.

**2. Hide mode:** Remove broken images from the page entirely, along with their 
parent link and surrounding `<figure>` or caption wrapper. Best for clean layouts
where missing images should leave no trace.

#### Privacy

This plugin does not collect, store, or transmit any data outside your WordPress
installation. No tracking, no analytics, no external requests.

## 螢幕擷圖

 * [[
 * General Options — toggle plugin status and choose between Replace or Hide mode
 * [[
 * Custom Redirection — map specific broken image URLs to specific replacements
 * [[
 * Cache-clearing reminder modal that appears after saving settings

## 安裝方式

#### Automatic Installation

 1. Go to **Plugins  Add New** in your WordPress admin
 2. Search for “404 Image Redirection”
 3. Click **Install Now**, then **Activate**
 4. Go to **404 Image Redirection** in your admin menu
 5. Toggle the plugin status to ON, choose your mode, upload a default image (for Replace
    mode), and save

#### Manual Installation

 1. Download the .zip file
 2. Go to **Plugins  Add New  Upload Plugin**
 3. Select the .zip file and click **Install Now**
 4. Activate and configure under the **404 Image Redirection** menu

## 常見問題集

### Does this plugin slow down my site?

No. On Apache, the rewrite happens at the server level with zero PHP execution per
image request. On Nginx or LiteSpeed, the PHP fallback only runs when an image returns
a 404 — healthy images are unaffected.

### Will this plugin work with my caching plugin?

Yes. After changing any setting, clear your caching plugin and CDN cache so visitors
see the change immediately. The plugin shows a reminder modal after each save with
the recommended steps.

### What’s the difference between Replace mode and Hide mode?

**Replace mode** shows your chosen default image in place of any broken image — 
best for visual consistency. **Hide mode** removes the broken image element from
the page entirely, along with its link and caption — best for clean layouts.

### What happens to my SEO?

Your SEO improves. Instead of returning 404 errors that search engines penalize,
broken image URLs now return a 200 OK response with a real image (in Replace mode)
or are removed cleanly from the rendered page (in Hide mode).

### Does it work on Nginx or LiteSpeed?

Yes. The plugin auto-detects when `.htaccess` rules can’t be applied and falls back
to a PHP-based handler that produces the same result.

### What happens when I deactivate the plugin?

The plugin removes every rule it added to `.htaccess` — surgically. WordPress’s 
own rules, other plugins’ rules, and any custom rules you or your host added remain
completely untouched. Your settings and custom redirection rules stay in the database
so you can reactivate later without losing your config.

### What happens when I delete the plugin?

A complete cleanup runs: the plugin’s database table, its options, and all its `.
htaccess` markers are removed. Your site is returned to exactly the state it was
in before installing the plugin.

### Does it send any data externally?

No. Zero data leaves your server. No tracking, no analytics, no phone-home.

## 使用者評論

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

### 󠀁[Replaces image but not broken icon](https://wordpress.org/support/topic/replaces-image-but-not-broken-icon/)󠁿

 [dannyg82](https://profiles.wordpress.org/dannyg82/) 2024 年 7 月 25 日

By the way the last review here is incorrect. Replace broken image does work and
has exactly the same effect as this plugin. Both put a new image in place but don’t
remove the broken image icon.

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

### 󠀁[This Worked 🙂](https://wordpress.org/support/topic/this-worked-2/)󠁿

 [macksix](https://profiles.wordpress.org/macksix/) 2022 年 10 月 14 日

This plugin actually worked. “Replace Broken Images” plugin didn’t work for me. 
Kudos!

 [ 閱讀全部 2 則使用者評論 ](https://wordpress.org/support/plugin/broken-images-redirection/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈404 Image Redirection (Replace Broken Images)〉的開發相關
工作。

參與者

 *   [ wp-buy ](https://profiles.wordpress.org/wp-buy/)

[將〈404 Image Redirection (Replace Broken Images)〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/broken-images-redirection)

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

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

## 變更記錄

#### 2.0

 * NEW: “Hide broken images entirely” mode + PHP fallback for Nginx/LiteSpeed servers
 * NEW: Cache-clearing reminder modal after save, “Settings” link on Plugins page,
   and SEO Redirection cross-promo
 * SECURITY: CSRF nonce verification on all forms, switched to `manage_options` 
   capability, prepared SQL statements, and Path Traversal protection
 * IMPROVED: Master kill switch (plugin truly stops when disabled), surgical .htaccess
   cleanup on deactivate, atomic file writes, and proper uninstall.php

#### 1.4

 * Tested with WordPress 6.7.1

#### 1.3

 * Tested with WordPress 6.1

#### 1.2

 * Tested on the latest WP release

#### 1.1

 * Initial version

## 中繼資料

 *  版本 **2.0.0**
 *  最後更新 **4 週前**
 *  啟用安裝數 **600+**
 *  WordPress 版本需求 ** 5.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.9.4**
 *  PHP 版本需求 ** 7.2 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/broken-images-redirection/)
 * 標籤:
 * [broken images](https://tw.wordpress.org/plugins/tags/broken-images/)[default image](https://tw.wordpress.org/plugins/tags/default-image/)
 *  [進階檢視](https://tw.wordpress.org/plugins/broken-images-redirection/advanced/)

## 評分

 3.5 星，滿分為 5 星

 *  [  1 個 5 星使用者評論     ](https://wordpress.org/support/plugin/broken-images-redirection/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/broken-images-redirection/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/broken-images-redirection/reviews/?filter=3)
 *  [  1 個 2 星使用者評論     ](https://wordpress.org/support/plugin/broken-images-redirection/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/broken-images-redirection/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/broken-images-redirection/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/broken-images-redirection/reviews/)

## 參與者

 *   [ wp-buy ](https://profiles.wordpress.org/wp-buy/)

## 技術支援

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

 [檢視技術支援論壇](https://wordpress.org/support/plugin/broken-images-redirection/)