Image re-usability

Last updated on
30 April 2025

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

Nearly all the various image-handling modules allow you to display a given image in multiple nodes by treating an image as an asset.

Other image handling modules allow you to upload images into a node, but these images are only linked from the node itself. To get this image to display in another node, you'd either have to re-upload that image, or identifty the location of the image, and paste in the link as an img src tag using standard HTML <img /> tags.

Inline and Imagefield are two contributed modules which work in this way.

Imagefield works with Content (CCK) to include a field on a custom content type to place an image within that node. For example you could customize the blog content type with an Imagefield. Once you upload an image to your first blog post, the link to the image is saved in that blog post. When you create a second blog post and you want to include the same image- you would have to find the location of the image file (the path to the image) and add an img tag to your second blog post. Of course, this method has its own limitations; for further details see files and the database and file-to-node relationships.

Another solution with Imagefield would be to create a custom content type which treated images as an asset, e.g., "blog images". Then, edit your blog post content type to include a new field type: node reference to select and link to "blog images". Node reference is a module which comes included with CCK, but must be enabled once installed.

Help improve this page

Page status: Not set

You can: