{"id":150915,"date":"2021-12-08T18:47:24","date_gmt":"2021-12-08T18:47:24","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/broken-images-redirection\/"},"modified":"2026-05-09T06:20:49","modified_gmt":"2026-05-09T06:20:49","slug":"broken-images-redirection","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/broken-images-redirection\/","author":13610376,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.0.0","stable_tag":"trunk","tested":"6.9.4","requires":"5.0","requires_php":"7.2","requires_plugins":null,"header_name":"404 Image Redirection (Replace Broken Images)","header_author":"wp-buy","header_description":"This plugin will help to replace broken images in posts and pages with a default image.","assets_banners_color":"2a5d7a","last_updated":"2026-05-09 06:20:49","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/broken-images-redirection\/","header_author_uri":"https:\/\/profiles.wordpress.org\/wp-buy\/#content-plugins","rating":3.5,"author_block_rating":0,"active_installs":600,"downloads":9958,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.1":{"tag":"1.1","author":"osamaesh","date":"2021-12-14 11:41:08"},"1.2":{"tag":"1.2","author":"osamaesh","date":"2022-05-25 11:28:46"},"1.3":{"tag":"1.3","author":"osamaesh","date":"2024-02-07 07:34:52"},"1.4":{"tag":"1.4","author":"wp-buy","date":"2025-06-15 19:10:00"},"2.0.0":{"tag":"2.0.0","author":"osamaesh","date":"2026-05-09 06:20:49"}},"upgrade_notice":{"2.0":"<p>Major release with critical security fixes (CSRF protection, capability check), a new &quot;Hide broken images&quot; mode, and PHP fallback for Nginx\/LiteSpeed. Backup recommended before upgrading. All existing settings are preserved automatically.<\/p>"},"ratings":{"1":0,"2":1,"3":0,"4":0,"5":1},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2643830,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2643830,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":3527029,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1","1.2","1.3","1.4","2.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3527029,"resolution":"1","location":"plugin","width":772,"height":252},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3527029,"resolution":"2","location":"plugin","width":1668,"height":633},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3527029,"resolution":"3","location":"plugin","width":1235,"height":555}},"screenshots":{"1":"General Options \u2014 toggle plugin status and choose between Replace or Hide mode","2":"Custom Redirection \u2014 map specific broken image URLs to specific replacements","3":"Cache-clearing reminder modal that appears after saving settings"}},"plugin_section":[],"plugin_tags":[237937,128337,125265,262391,262390],"plugin_category":[50],"plugin_contributors":[78387],"plugin_business_model":[],"class_list":["post-150915","plugin","type-plugin","status-publish","hentry","plugin_tags-404-image","plugin_tags-broken-images","plugin_tags-default-image","plugin_tags-image-fallback","plugin_tags-replace-broken-images","plugin_category-media","plugin_contributors-wp-buy","plugin_committers-osamaesh","plugin_committers-wp-buy"],"banners":{"banner":"https:\/\/ps.w.org\/broken-images-redirection\/assets\/banner-772x250.png?rev=3527029","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/broken-images-redirection\/assets\/icon-128x128.png?rev=2643830","icon_2x":"https:\/\/ps.w.org\/broken-images-redirection\/assets\/icon-256x256.png?rev=2643830","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/broken-images-redirection\/trunk\/screenshot-1.png?rev=3527029","caption":"General Options \u2014 toggle plugin status and choose between Replace or Hide mode"},{"src":"https:\/\/ps.w.org\/broken-images-redirection\/trunk\/screenshot-2.png?rev=3527029","caption":"Custom Redirection \u2014 map specific broken image URLs to specific replacements"},{"src":"https:\/\/ps.w.org\/broken-images-redirection\/trunk\/screenshot-3.png?rev=3527029","caption":"Cache-clearing reminder modal that appears after saving settings"}],"raw_content":"<!--section=description-->\n<p><strong>404 Image Redirection (Replace Broken Images)<\/strong> 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 \u2014 your choice.<\/p>\n\n<h4>Why this plugin?<\/h4>\n\n<p>Broken images hurt your site:\n* They damage user experience \u2014 visitors lose trust instantly\n* They hurt your SEO \u2014 search engines penalize 404 errors\n* They look unprofessional \u2014 especially on product and content pages<\/p>\n\n<h4>Key Features<\/h4>\n\n<ul>\n<li><strong>Replace broken images<\/strong> with a default image of your choice<\/li>\n<li><strong>Hide broken images entirely<\/strong> \u2014 JavaScript removes them from the DOM along with their links and captions<\/li>\n<li><strong>Custom redirection rules<\/strong> \u2014 map specific broken image URLs to specific replacement images<\/li>\n<li><strong>Server-level performance on Apache<\/strong> \u2014 uses a small <code>.htaccess<\/code> rule, zero PHP overhead per request<\/li>\n<li><strong>PHP fallback for Nginx and LiteSpeed<\/strong> \u2014 works on any host, even if <code>.htaccess<\/code> is unavailable<\/li>\n<li><strong>Clean uninstall<\/strong> \u2014 removes only what the plugin added, never touches WordPress or other plugins' rules<\/li>\n<li><strong>Master kill switch<\/strong> \u2014 when you toggle the plugin off, it truly stops working<\/li>\n<\/ul>\n\n<h4>How it works<\/h4>\n\n<p>On Apache servers, the plugin writes a small rewrite rule to your <code>wp-content\/.htaccess<\/code> 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).<\/p>\n\n<p>On Nginx, LiteSpeed, or hosts with a non-writable <code>.htaccess<\/code>, the plugin automatically falls back to a PHP-based handler that does the same job via WordPress's <code>template_redirect<\/code> hook.<\/p>\n\n<h4>Two display modes<\/h4>\n\n<p><strong>1. Replace mode (default):<\/strong> Show your chosen default image whenever a broken image is requested. Best for visual consistency.<\/p>\n\n<p><strong>2. Hide mode:<\/strong> Remove broken images from the page entirely, along with their parent link and surrounding <code>&lt;figure&gt;<\/code> or caption wrapper. Best for clean layouts where missing images should leave no trace.<\/p>\n\n<h4>Privacy<\/h4>\n\n<p>This plugin does not collect, store, or transmit any data outside your WordPress installation. No tracking, no analytics, no external requests.<\/p>\n\n<!--section=installation-->\n<h4>Automatic Installation<\/h4>\n\n<ol>\n<li>Go to <strong>Plugins \u2192 Add New<\/strong> in your WordPress admin<\/li>\n<li>Search for \"404 Image Redirection\"<\/li>\n<li>Click <strong>Install Now<\/strong>, then <strong>Activate<\/strong><\/li>\n<li>Go to <strong>404 Image Redirection<\/strong> in your admin menu<\/li>\n<li>Toggle the plugin status to ON, choose your mode, upload a default image (for Replace mode), and save<\/li>\n<\/ol>\n\n<h4>Manual Installation<\/h4>\n\n<ol>\n<li>Download the .zip file<\/li>\n<li>Go to <strong>Plugins \u2192 Add New \u2192 Upload Plugin<\/strong><\/li>\n<li>Select the .zip file and click <strong>Install Now<\/strong><\/li>\n<li>Activate and configure under the <strong>404 Image Redirection<\/strong> menu<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20slow%20down%20my%20site%3F\"><h3>Does this plugin slow down my site?<\/h3><\/dt>\n<dd><p>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 \u2014 healthy images are unaffected.<\/p><\/dd>\n<dt id=\"will%20this%20plugin%20work%20with%20my%20caching%20plugin%3F\"><h3>Will this plugin work with my caching plugin?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"what%27s%20the%20difference%20between%20replace%20mode%20and%20hide%20mode%3F\"><h3>What's the difference between Replace mode and Hide mode?<\/h3><\/dt>\n<dd><p><strong>Replace mode<\/strong> shows your chosen default image in place of any broken image \u2014 best for visual consistency. <strong>Hide mode<\/strong> removes the broken image element from the page entirely, along with its link and caption \u2014 best for clean layouts.<\/p><\/dd>\n<dt id=\"what%20happens%20to%20my%20seo%3F\"><h3>What happens to my SEO?<\/h3><\/dt>\n<dd><p>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).<\/p><\/dd>\n<dt id=\"does%20it%20work%20on%20nginx%20or%20litespeed%3F\"><h3>Does it work on Nginx or LiteSpeed?<\/h3><\/dt>\n<dd><p>Yes. The plugin auto-detects when <code>.htaccess<\/code> rules can't be applied and falls back to a PHP-based handler that produces the same result.<\/p><\/dd>\n<dt id=\"what%20happens%20when%20i%20deactivate%20the%20plugin%3F\"><h3>What happens when I deactivate the plugin?<\/h3><\/dt>\n<dd><p>The plugin removes every rule it added to <code>.htaccess<\/code> \u2014 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.<\/p><\/dd>\n<dt id=\"what%20happens%20when%20i%20delete%20the%20plugin%3F\"><h3>What happens when I delete the plugin?<\/h3><\/dt>\n<dd><p>A complete cleanup runs: the plugin's database table, its options, and all its <code>.htaccess<\/code> markers are removed. Your site is returned to exactly the state it was in before installing the plugin.<\/p><\/dd>\n<dt id=\"does%20it%20send%20any%20data%20externally%3F\"><h3>Does it send any data externally?<\/h3><\/dt>\n<dd><p>No. Zero data leaves your server. No tracking, no analytics, no phone-home.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0<\/h4>\n\n<ul>\n<li>NEW: \"Hide broken images entirely\" mode + PHP fallback for Nginx\/LiteSpeed servers<\/li>\n<li>NEW: Cache-clearing reminder modal after save, \"Settings\" link on Plugins page, and SEO Redirection cross-promo<\/li>\n<li>SECURITY: CSRF nonce verification on all forms, switched to <code>manage_options<\/code> capability, prepared SQL statements, and Path Traversal protection<\/li>\n<li>IMPROVED: Master kill switch (plugin truly stops when disabled), surgical .htaccess cleanup on deactivate, atomic file writes, and proper uninstall.php<\/li>\n<\/ul>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>Tested with WordPress 6.7.1<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Tested with WordPress 6.1<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Tested on the latest WP release<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Initial version<\/li>\n<\/ul>","raw_excerpt":"Replace broken images with a default image, hide them entirely, or set custom per-image redirection rules. Lightweight, fast, and SEO-friendly.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/150915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=150915"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/wp-buy"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=150915"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=150915"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=150915"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=150915"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=150915"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=150915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}