Skip to content

Choose which cookie categories to allow.

CICO Media
Find image usage

Why a WordPress Image Shows as Unattached but Is Actually Used

An image marked Unattached can still be on your site, in an ACF field, an Elementor layout, a widget or a theme setting. Learn why, and how to check before you delete.

By CICO Media4 min read

On this page

You open the Media Library, filter by Unattached, and find the photo from your homepage hero in the list. You know it is on the site. You can see it on the page. Yet WordPress says it belongs to nothing. This article explains why that happens, and what to do before you act on the label.

The short answer

Unattached is not a statement about usage. It means WordPress has no parent post recorded for the image. The label is correct. It just answers a different question from the one you are asking.

How WordPress decides what is attached

WordPress sets an image’s parent once, at upload time, and only if you upload from inside a post or page. From that moment on, the Uploaded to column keeps showing that one post.

The parent stays empty when you:

  • upload through Media > Add New, outside any post;
  • pick an existing image from the library for a custom field, a builder element or a widget;
  • upload through a builder or a theme option screen that does not set a parent.

In all three cases the image can be on a live page, and the library still says Unattached.

Where “unattached but used” images hide

These places store a reference to an image, but none of them tells the Media Library:

  • Custom fields, such as ACF. An Image field saves the attachment ID. A Gallery field saves a list of IDs. A Repeater saves them row by row. The post keeps the data, the image keeps no parent.
  • Page builder layouts. Builders such as Elementor keep layouts as structured data. A background image or an image widget points to the file, not to a parent post.
  • Widgets. An image widget in a sidebar or a footer stores its image reference in the site options.
  • Theme settings. A logo, a header image or a site icon is chosen from the library and saved as a setting.
  • Featured images. The featured image is stored as a reference on the post. It does not change the parent of the image.
An image used through an ACF field: the panel names the page, the source and the field group.

How to check by hand

Work on a staging copy if you can, and back up first.

  1. Search the content. In Posts and Pages, search for the file name without the extension and without the size suffix. This finds content that mentions the file. It does not look at custom fields or builder data.

  2. Check the custom fields. Open the field groups that contain Image, File or Gallery fields and see which posts use them.

  3. Open the page in the builder. Look at backgrounds and image widgets in the layout.

  4. Check widgets and theme settings. Look at Appearance > Widgets, and at the logo and header options of your theme.

  5. Search the database. A read-only query by file name or by image ID shows references in post meta and options. Replace wp_ with your table prefix, photo with the file name and 123 with the image ID.

    SELECT post_id, meta_key
    FROM wp_postmeta
    WHERE meta_value LIKE '%photo%' OR meta_value = '123';
    
    SELECT option_name
    FROM wp_options
    WHERE option_value LIKE '%photo%';

How CICO Media Pro shortens the check

CICO Media Pro keeps a usage index in the background, so the library already knows which images are referenced. Each card shows Used · N or No usage found, and the Where used panel lists each place: the post or page, the source (Gutenberg, Elementor, ACF, WooCommerce or WPBakery), the ACF field group when there is one, and a link to edit it.

That means an image labelled Unattached by WordPress can still show Used · 1 in CICO, with the page that uses it. You can filter the library by usage, so you see the images with No usage found in one list, and you can open each one to check the details.

Where used names the source: Gutenberg, Elementor, ACF, WooCommerce or WPBakery.

Two things to keep in mind:

  • Some references show Unknown. A custom field can be stored without the theme printing it. In that case CICO tells you the reference exists and says it cannot verify the frontend. We explain the three states in Used vs Visible.
  • No usage found means nothing was found. It is not a promise that an image is safe to delete. CICO never deletes anything for you.

In the docs: the sources CICO Media detects in Integrations, and how the Usage Index keeps them up to date.

Summary

  • Unattached means no parent post. It says nothing about usage.
  • ACF fields, builders, widgets, theme settings and featured images can all use an image that WordPress still calls unattached.
  • Check those places before you delete, back up first, and delete in small batches. The full method is in How to Find Where an Image Is Used in WordPress, and the difference between the two ideas in Unattached vs Unused Media.

Frequently asked questions

Why does WordPress say an image is unattached when it is on my site?

Unattached only means WordPress has no parent post recorded for the image. The parent is set when you upload from inside a post. Images added later, or through a builder, a custom field, a widget or a theme setting, can stay unattached while they appear on a page.

Can I attach an image to a post to fix the label?

You can change the parent in some setups, but it does not record where the image is used. It only changes the Uploaded to column. It is not a usage check.

How do I find where an unattached image is used?

Check the places WordPress does not index: custom fields, page builder layouts, widgets and theme settings. You can search the database by file name or image ID, or use a plugin that keeps a usage index.

Is it safe to delete an unattached image?

Not by default. Check where it is used, take a backup, and delete in small batches. Deleting from the Media Library is permanent unless you enable the media trash.

Does CICO Media Pro find images used in ACF and Elementor?

Yes. CICO Media Pro detects images used in Gutenberg, Elementor and ACF and shows the exact location. No tool finds every possible reference, so treat a result of no usage found as a prompt to check, not as a guarantee.

Get CICO Media Pro