Attaching images to other nodes

Last modified: January 10, 2009 - 21:14

The image attach module allows you to attach images to any kind of node. Images are either from existing image nodes, or new image can be uploaded (and an image node is created for it automatically). The image attach module is included with the image module package.

To use the image attach module you need to:

  1. enable the image module and the image attach module
  2. make sure attachment of existing images to nodes is enabled, at admin/settings/image/image_attach (this is the default)
  3. go to admin/content/types to administer content types, then for each content type for which you want to enable attachment of images, hit "edit" (or the content type name) and set the option for "Attach images" to Enable

The image is displayed as a thumbnail, linked to the image node, in the top RH corner of the node by default. This can be controlled to a minor degree by changing the "Attached image ... weight" on the content type's admin page (see above), and to a more major degree using theming and custom CSS.

Only one image node can be attached in this way to another node.

Alternatives to Image Attach

The following modules allow you to insert images directly within a node's body, allowing more than one image within a node, and giving finer control of their position.

  • The Image Assist module generates an "Add image" link under fields of your choice. Clicking the link opens an image browsing window, displaying all images that have been uploaded with the Image module.
  • The Image Filter allows you to use tags of the form [image:nodeid] within node body, referring to the id of an image node.
  • The IMCE module provides more sophisticated capabilities for inserting image nodes.
  • imagefield - A utility under CCK (The Content Construction Kit) allows a content type node to have one or more images attached to it. It's simpler to just 'attach image to page' and has some advantages in node data management, but does not natively create or allow for full node definitions to be created for each attached image. This means such images cannot be tagged, managed or described individually.
 
 

Drupal is a registered trademark of Dries Buytaert.