Attach Unattached Images

Attach Unattached Images

Details
View on WordPress

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

  1. Go to Settings > Attach Unattached Images in your WordPress admin.
  2. Select the post types you want to scan: Posts, Products, and/or Downloads.
  3. Choose whether to scan Post Content, Post Excerpt, or both.
  4. Optionally enable the Attachment Page Redirector to redirect attachment pages to their parent post.
  5. 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

Details

Plugin code:
attach-unattached-images
Plugin version:
1.0
Outdated:
No
WP version:
5.0 or higher
PHP version:
7.2 or higher
Test up to WP version:
7.0
Total installations:
0
Last updated:
2026-06-18
Rating:
Times rated:
0
attachments
images
media
seo