跳到内容

404 Image Redirection (Replace Broken Images)

v2.0.0

wp-buy · 2021年12月8日 上架

Replace broken images with a default image, hide them entirely, or set custom per-image redirection rules. Lightweight, fast, and SEO-friendly.

正在使用
500+
评分
3.5 / 5
累计下载
1.1 万
最近更新
2026年5月9日
2 条评价需要 WordPress 5.0+已测试到 6.9.12PHP 7.2+

贡献者

截图

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

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.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums