Unattach images from posts in WordPress

Unattach is a very simple plugin which allows detaching images and other media from WordPress posts.

Download it from the WordPress site or simply search for “Unattach” from Plugins > Add New in your blog’s admin interface.

WordPress classifies all uploaded files (JPEG, PDF, MP3 etc.) as media. These media can be attached to a post, page or custom post type. However, as of WordPress 3.1, the only way to detach a media item from a post is to delete either the post or the media item.

This plugin adds a link below each media file in the Media Library admin view to allow users to unattach files.

Comments

Simon 29 Mar 2011

This is one of my favourite plugins ever. Love it!

I’m often changing the images in my galleries and now I have the opportunity to unattach media from a page rather than just delete it (or edit the DB).

Makes my life a lot easier. Thanks so much.

Daryl 5 Apr 2011

Exactly what I (and I’m sure many others) need.
Small, unobtrusive and effective.
Just in time for when I needed it.
Thanks!

David Calhoun 9 Apr 2011

How hard would it be to add the “Unattach” button to the “Gallery” sections of posts/pages as well? I’d be nice to unattach a photo from a post/page while editing that post/page.

Thoughts?

Tamlyn 11 Apr 2011

Thanks for the kind words!

@David probably not very hard. However I expect this functionality will be included in WordPress core soon (there are a couple of issues logged in trac) so it’s probably not worth spending too much time on the plugin.

Deek 19 Apr 2011

Hi Tamlyn, it does unattach, but how do I delete the picture’s post page exactly?

I still have the blank page with the picture in it accessible if you type it directly (site.com/post/picturepost) even though it’s unattached

Jackson 17 May 2011

Many thanks for this much needed plugin – it’s awesome.

Sean 6 Jun 2011

Hi Tamlyn. This is exactly what I was looking for, but I am having trouble getting it to work as expected. Clicking the “Unattach” link, simply directs me to an error message: “You do not have sufficient permissions to access this page.”

I’ve tried playing with various file permission settings to no avail. And considering I am the administrator of the site, I doubt that it is a user restriction.

Do you have any thoughts as to the problem or is there any more information that I could provide to help diagnose this?

Thanks for your help!

Nancy Strahle 22 Jun 2011

Oh, my! Thank you so much for this!

Gary Go 24 Jun 2011

Great stuff. A basic yet useful function that WordPress simply forgets.

It will be even better ff a Bulk Unattach is added to the Bulk Actions drop down list. :-)

Gary Go 24 Jun 2011

Even better, add a Bulk Attach option to the drop down list to allow Bulk-Changing the destination posts/pages! :-)

Kim 11 Jul 2011

THANKS!!! This plugin is awesome and stopped me going a bit mad

Andrew 20 Jul 2011

There are so many forum discussions on this issue, with no good answer. I’m not a huge fan of using plugins to change basic features like this, but this is a total lifesaver. This plugin needs to get some major publicity. I barely stumbled across it, and after 20 minutes of research. THANK YOU!

Tamlyn 20 Jul 2011

Thanks Andrew. Feel free to publicise!

Chris Newman 2 Sep 2011

Perfect!

was getting tired of uploading and reattching… plugin solves this like a charm

Cheryl 12 Dec 2011

Worked just as expected. Thanks for a straightforward answer to a clear need.

Nesha 1 Feb 2012

Hey Tamlyn, do you know how to solve problem…when I go to Medial Library and click on “View” for unattached image…it takes looong time to display…if you have image.php file in your theme folder…but without that file it load fast.

tnx.

Tamlyn 1 Feb 2012

Hi Nesha, no I don’t know why that would be. Is it caused by this plugin? Does it still happen when the plugin is disabled?

Brian J Hoskins 8 Feb 2012

This plugin was just the solution I was looking for after a whole punch of images somehow ended up being attached to one of my posts in error.

The plugin would be even better if it appeared as an option in the ‘bulk actions’ list, so that I could select all the erroneous images and unattach them in one hit.

Lynne 7 Mar 2012

This is an absolutely FABULOUS plug-in! Thank you so much! I can re-attach my hair now…

Adam Blodgett 19 Mar 2012

Great plugin, and I want to second the previous bulk unattach comment from above.

Bob Solomon 12 Apr 2012

thank you very much

Write a comment