I installed the image module and the image_attach that comes with it.

I used the image_attach on a page to add an image to the content. That works.

but now I want to get rid of that image again - how do I do that? I see no option/button whatever to remove an attached image?

Question: how do I remove an attached image from a content node?

thanks
Jens

Comments

bfo’s picture

edit the content and remove the text that looks like this

[img_assist|nid=71|title=ukralogo|desc=|link=none|align=left|width=100|height=100]

hope that helps

ansorg’s picture

no, I'm not talking about image_assist - that's something different.

I'm talking about image_attach, that is part of the "image" module installation

glendac’s picture

Go to Administer >> content. Click on edit next to the content you want to delete the image from. In the Edit form for that content, there is a field labeled File attachments. There should be boxes there for you to check to delete thumbnail and original attachments of the image you want to delete.

mortendk’s picture

The only solution i could come up with at this point is just to delete the image, but that kinda sucks when other nodes are using the same attached image :(

/morten.dk *king of Denmark*

glendac’s picture

Yes, I understood what you were saying. It's the image_attach feature that comes with the image module that we're talking about here (there's no file attachment module). I agree with you that it rather sucks there's no way to delete an image attached to a node without deleting the original image. But one way of deleting the attached image is indeed by editing the original image content and checking off the boxes under 'Delete' in 'File attachments' on the edit form. For example, if I have created an image content and used that in a story node (by selecting the option to use existing image nodes) and later I decide I didn't want that image in the story, I have to go back to the image content that I have used and delete the images there under 'File attachments'.

I agree, it's not good design because the whole point of image_attach is to make it easier to reuse images in different types of content without uploading the image each time. Perhaps you can report this as a bug or a feature request for this module.

mortendk’s picture

wow thats black magic.

Came up with another were bad hack is just to make use og the old 1x1 blank.gif file thats still laying around at the bottom of the drawer since the days of table upload that file under the name "none" and voila no more attached image. -I know its an awful way to do it but well gets the job done *eheeem*...

theres a couple of bug reports there:
http://drupal.org/node/62025
http://drupal.org/node/97775

im not skilled enough to come up with a solution, other than this workaround :(

/morten.dk *king of stuff*

abegg.ch’s picture

Another hack:

  1. open your database administration tool
  2. browse to the table called "image_attach"
  3. delete the row where the "nid" column is the node-id of the node from which you want to delete the attached image
  4. eventually: in table "node" delete the row where "nid" is the "iid" from the deleted row above
Renee S’s picture

Enable the setting under Site Configuration -> Image Attach and enable "Attach Existing Images." Then you'll get a dropdown box above the image browse in the content edit form. You can select the empty list item, and this will disassociate the image from the node without having to delete anything.

nishitdas’s picture

Thanks allen
It worked and saved me a lot of time.
Very simple and effective method

dimitris_s’s picture

The last method [z allen] didn't work for me... In fact there is no way to delete attached images...

Even if someone deletes the image file from the server, then a text link remains there, leading nowhere...

It's a very simple function, yet not integrated...

http://www.dobro.gr - Online community for Greek students in Bulgaria
http://simpledesigns.hopto.org - simple designs

joachim’s picture

Upgrade to the latest version -- the removal of attached images is now possible.

When you edit a node that has an attached image, you'll see at the top of the drop-down list of image nodes an option called 'None'.
Just pick that.

dimitris_s’s picture

Τhank you joachim :-)

http://www.dobro.gr - Online community for Greek students in Bulgaria
http://simpledesigns.hopto.org - simple designs

asdLArs’s picture

You can select none, but that's another story, what most people like me are looking for is an actual button to delete or detach the image or images from the node, try the following exercise.

1.- Install a drupal with image attach and it's requirements.
2.- Ask a non-drupaler to create a node and attach 3 images
3.- Now ask him to change image number 2.

It's very complex task for a "regular" person.

Cheers.

dsmoother’s picture

Has anyone modified the image_attach module to delete image files from the db location in (drp_files) or delete the image files from the server on the deletion submit on the image_attach module? I am looking for some guidance on getting this done. (drup 6). Thanks for the input.