Redirect WordPress attachment pages for all unattached images to the current site's home page.
Contributors: Robert Neu, Ozzy Rodriguez
Requires: 4.1.2
Tested up to: 5.4.1
License: GPL-2.0+
The default behavior in WordPress is to generate attachment pages for all of the images in your media library. While this can sometimes be useful, it can also cause problems.
When you upload an image to your media library without inserting it into a post or page, it becomes an unattached image. By default, these images generate attachment pages with no pretty permalink structure. This isn't very useful for anyone, including search engines.
This plugin takes all of these unattached images and safely redirects them using a 301 redirect to your site's home page. If you're using WordPress multisite, it redirects to the current site's home page. There are no options or settings, just install, activate, and enjoy better SEO and fewer useless pages on your website!
The best way to install this plugin is to either download a copy from the WordPress.org repository or search for "Redirect Unattached Images" from your WordPress admin dashboard.