Need help? Check out our Support site, then


Can one detach an image from it's post or page?

  1. Can I detach an image from it's post or page and reattach it to another post or page?

    I mistakenly added several April images to a March page and it seems that the only way to reassign them is to delete them and reload them and then that messes up the name of the file as WP adds a 1 to the file name despite the fact that the file does not exist as it has been deleted.

    If an aimage has been attached there needs to be a way to reassign this.

    The blog I need help with is earthquakearchives.wordpress.com.

  2. Attaching an image to a page or a post means uploading it from your computer to your blog via the Add media tool of that page or post. Inserting the image in a page or a post means adding it to the content of that page or post. The two are independent: you can upload an image without inserting it and vv.
    So you simply edit the March page and delete the images from the page (not from the media library), then you edit the April page, click Add Media, click Media Library, select those already uploaded images, insert them in the page.

  3. Thanks for responding. Unfortunately it is not as simple as that. The images are not inserted into the post, they only appear in a gallery and because there are so many to do I do not use IDs as I would be continually adding to them through the month.

    The gallery simply uses the attributes 'file', 'columns', 'order' and 'orderby' to display the images in the carousel. The images do not otherwise appear on the page or in to code of the page. They cannot be deleted from the page as they do not exist on the page and likewise they cannot be added to the April carousel (gallery) as they are already attached to March and cannot be detached.

    My understanding is that you 'attach' an image either manually in the media library, or by 'inserting' the image into a post or page. Simply uploading the image to the media library does not attach it.

    Uploading to a post or page both inserts and attaches the image. This is not what I need in this instance.

    I need a method of detaching the images preferably other than deleting them and uploading them again, and not using the id attribute on the gallery as that is way too long winded for the hundreds of images I upload which are NOT suited to rearrangement by drag and drop.

  4. You're welcome, but sorry, you are a bit confused.
    1) If you upload an image from your computer to your blog via Media > Add New, it will be unattached. You can subsequently go to Media > Library and attach it to a post or page.
    2) If you upload an image from your computer to your blog via the Add Media tool of a post or a page, it will be attached to that post or page, regardless of whether you do or you don't insert it in the post/page.
    3) Deleting a gallery of images is easy. In the Visual editor, you click on the rectangle that represents the gallery then you click the delete icon. In the Text editor, you delete the gallery shortcode.
    4) To insert a gallery of already uploaded images into a post or a page, you edit that post/page, click the Add Media tool, click Create Gallery (top left), select the images, click Create a New Gallery (bottom right), select options, click Insert Gallery.
    5) But yes, this will create an ID based gallery. If you don't like that, the only other way is to re-upload the images: you cannot un-attach attached images.

  5. In effect you just repeated what I said so far from being confused I know exactly how this works, and yup you have just confirmed that you cannot detach an image which was my original question.

    The point is that you should be able to.

    I thank you once again for taking the trouble to respond.

  6. I tried to clarify things, and I didn't "just repeat" what you said, because what you said included mistakes.
    This was wrong:

    The images do not otherwise appear on the page or in to code of the page. They cannot be deleted from the page as they do not exist on the page and likewise they cannot be added to the April carousel (gallery) as they are already attached to March and cannot be detached.

    This was also wrong:

    Uploading to a post or page both inserts and attaches the image.

    Plus this (re-uploading images doesn't require deleting them):

    I need a method of detaching the images preferably other than deleting them and uploading them again

  7. The images do not otherwise appear on the page or in to code of the page. They cannot be deleted from the page as they do not exist on the page and likewise they cannot be added to the April carousel (gallery) as they are already attached to March and cannot be detached.

    You are saying that this is wrong? In what way is it wrong? The images do not appear in the code of the page at all. Perhaps you are not aware of how the gallery works? It is perfectly possible to create a gallery by attaching images to a post and the then just specifying gallery at the basic minimum. In this instance the images are attached to the post or page but do NOT appear in the code. What I stated was correct. By the smae token they cannot be attached to another page as they are already attached even though the code for the image does not exist on the page.

    By the way I do not use the visual editor as I am a programmer.

    Uploading to a post or page both inserts and attaches the image.

    It does indeed do just that. This is not wrong. Uploading to a post inserts the code for the image into the post and attaches it.

    I need a method of detaching the images preferably other than deleting them and uploading them again

    I am fully aware of that fact but why would I want an obsolete duplicate set of images that are incorrectly attached to March, and displaying on March when I have re-uploaded to April? You seem to be forgetting that to simply upload the image again will not remove them from the March page where they are not supposed to be.

    Anyway, the point is that one cannot detach an image and one should be able to.

  8. Oh boy...

    Re quote 1 etc:
    No, you're wrong. When you insert a gallery, the Text editor doesn't display the image codes themselves, but it displays the gallery shortcode. You delete the gallery by deleting the shortcode, as I already said in my April 8 reply, #3.
    (As for "perhaps you are not aware of how the gallery works", try clicking my username and browse my blog please. Or click "Member" under my username and check past replies of mine.)

    Re Quote 2 and etc:
    No, you're wrong. When you edit a post, click Add Media, then click Upload Files or click Create Gallery then Upload files, then select the images from your computer or drag&drop them, the images get uploaded to your blog, and you can stop there: they are not inserted in the post unless you click Insert (image or gallery) after they've been uploaded.

  9. …it seems that the only way to reassign them is to delete them and reload them and then that messes up the name of the file as WP adds a 1 to the file name despite the fact that the file does not exist as it has been deleted.

    The files do exist! If you delete some pictures, their files can remain on servers for several days. But if you wait long enough, then your media library will be updated on the servers, and you can re-upload them without WordPress adding the "1" to the files.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags