I'm building a theme which includes displaying images which are not embedded in the body of the post by the user.

I understand the correct approach to this is to use the concept of attached images - ie. that images uploaded on a particular post edit page are associated with the post in the DB.

What I don't understand is WordPress has such meager support for this seemingly essential functionality. It is very poorly supported in the admin area - you cannot remove or view attachments, or attach a file that is already uploaded.

Am I missing something? Is there a plugin to solve this problem.

1 Answer 1


Wordpress doesn't have the innate functionality to enumerate attachments as is. Although any attached images can be viewed in the Media Library.

In the Media Library, you'll notice the list of images that are attached to a post have that attribute under the "Uploaded to" column. In that column, lets say for example an image was uploaded as a Featured Image for a post, you'll see it has the attribute of the post name.

Images that are not attached will have the (Unattached) attribute, and you'll also see an Attach link that brings up a window where you can select existing posts/pages to attach. This does works for images that are already uploaded, however it can only be done one image at a time.

Once images are attached, I'd assume your theme would need to have the functionality to display those attached images via a shortcode within the post body, or manage it via a built in gallery plugin or third party gallery plugin.

3rd party gallery plugins generally make a folder for their own uploads and have an admin page or shortcodes to manage those images. NextGEN Gallery is one example.

I too have seen this as a minor flaw in Wordpress, and Wordpress' ability to simply upload images, save them as a gallery and have them "automatically" attached to a post without being able to edit those per-post attachments separately is really quite unpolished.

Hope I would've shed some light from my perspective on your question.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.