Description
Every time you upload an image in WordPress, it gets stored in the media library as an “unattached” file — meaning it has no parent post assigned. Over time this leads to a cluttered media library and orphaned attachment pages that hurt your SEO.
Attach Unattached Images scans your content and automatically links each image back to the post, product, or download it belongs to.
Supported Post Types
The plugin scans the following post types:
- Post — the default WordPress blog post type.
- Product — the primary post type used by WooCommerce.
- Download — the primary post type used by Easy Digital Downloads (EDD).
What Gets Scanned
For each post, the plugin can scan:
- Post Content — the main body of the post.
- Post Excerpt — the summary/excerpt field.
- Or both — configurable from the plugin settings.
The plugin uses batch processing so there is no post limit and no PHP timeout risk, even on large sites with thousands of posts.
Attachment Page Redirector
Every image uploaded in WordPress gets its own attachment page. These pages are usually empty and thin on content — bad for SEO and confusing for visitors.
Enable this option to silently redirect anyone who lands on an attachment page straight to the parent post or product instead — keeping your bounce rate low and your content front and centre.
The redirect uses a 301 (permanent) status code, so search engines will update their index and pass full SEO value to the parent post.
How to Configure
- Go to Settings > Attach Unattached Images in your WordPress admin.
- Select the post types you want to scan: Posts, Products, and/or Downloads.
- Choose whether to scan Post Content, Post Excerpt, or both.
- Optionally enable the Attachment Page Redirector to redirect attachment pages to their parent post.
- Click Start Scan — the plugin will process your content in batches automatically.
Features
- Scan posts, WooCommerce products, and EDD downloads for unattached images
- Automatically attach unattached images to their correct parent post
- Choose to scan post content, post excerpt, or both
- Batch processing — no post limit, no PHP timeout issues
- Redirect attachment pages to the parent post or product with a 301 redirect
- Lightweight and easy to configure
Installation
- Upload the plugin files to the
/wp-content/plugins/attach-unattached-images/directory, or install directly through the WordPress Plugins screen. - Activate the plugin through the Plugins screen in WordPress.
- Go to Settings > Attach Unattached Images to open the plugin settings page.
- Select your post types and scan options.
- Click Start Scan to begin attaching images automatically.
FAQ
-
Which post types does the plugin support?
-
The plugin supports WordPress Posts, WooCommerce Products, and Easy Digital Downloads (EDD) Downloads.
-
Is there a limit on how many posts can be scanned?
-
No. The plugin uses batch processing to handle any number of posts without hitting PHP memory or timeout limits.
-
What content does the plugin scan to find images?
-
You can choose to scan the post content, the post excerpt, or both — configurable from the settings page.
-
What does the Attachment Page Redirector do?
-
It automatically redirects visitors who land on an attachment page to the parent post or product using a 301 permanent redirect. This improves SEO by consolidating page authority to the parent content and avoids thin/empty attachment pages being indexed by search engines.
-
Will the plugin affect images that are already attached?
-
No. The plugin only processes images that are currently unattached (i.e. have no parent post assigned in the media library).
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Attach Unattached Images” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Attach Unattached Images” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0
- Initial release
- Automatic image attachment via batch scanning
- Support for Posts, WooCommerce Products, and EDD Downloads
- Scan post content, excerpt, or both
- Attachment page 301 redirector