=== Remove Broken Images === Contributors: room34 Donate link: https://room34.com/payments Tags: missing images, broken images, media library, missing, broken, deleted, images Requires at least: 4.9 Tested up to: 5.8.2 Stable tag: 1.2.0 Very simply, uses JavaScript to remove broken images from page display. == Description == This is an extremely simple plugin that uses jQuery to remove broken images from displaying on your pages. Note that version 1 does not alter any content in the database, nor does it remove the image tags from the initial HTML output of the page, so it doesn't stop 404 errors, nor does it benefit SEO or PageSpeed scores. It does, however, prevent the dreaded "broken image" icon from appearing in your pages, and in most cases it will remove the blank space some browsers allocate for images as they are loading. **Coming in version 2:** We'll be adding an admin tool to let you see a list of posts and pages containing broken images, along with a tool to automatically remove their `img` tags from the database. == Installation == == Frequently Asked Questions == = I installed and activated the plugin. Now what? = That's it! There is no configuration necessary. The plugin adds a compact bit of JavaScript that detects if an image is returning a 404 error, and removes its HTML code from displaying on the page. = Does this plugin delete the image code from my page/post in the WordPress database? = No, version 1 does not make any changes whatsoever to your database. It also does remove the missing image file's URL from the HTML that is sent to the user's web browser; it removes the tags from the DOM (Document Object Model) *after* the page has been loaded, using JavaScript, to prevent "broken image" icons, extra white space, and links/captions associated with those missing images from displaying. == Screenshots == == Changelog == = 1.2.0 - 2021.11.22 = * Refactored all of the plugin's logic into jQuery, eliminating the need for using `the_content` filter to insert `onerror` into all `img` tags. = 1.1.0 - 2021.11.22 = * Added separate `script.js` file; moved JavaScript logic from inline `onerror` attribute to a function that will also remove parent `a` element and ancestor `.wp-caption` element from the DOM, in addition to the `img` tag itself. = 1.0.0 - 2021.11.20 = * Original version. == Upgrade Notice ==