Image: image nodes, attached images, and galleries

Last modified: January 22, 2010 - 05:16

The image module is used to create and administer images for your site. Each image is stored as a node, with reduced derivatives of the original generated automatically.

There are two default derivative sizes, 'thumbnail' and 'preview'. The thumbnail size is shown with the teaser for image posts and when browsing image galleries. The preview is the default size when first displaying an image node. The sizes can be altered, and further derivative sizes can also be defined. A maximum filesize and a pixel size to resize to can be set for new uploads.

Components

Further modules packaged with the image module let you do more with your images:

  • The Image gallery module lets you organize and display images in galleries. The list tab allows users to edit existing image gallery names, descriptions, parents and relative position, known as a weight. The add galleries tab allows you to create a new image gallery defining name, description, parent and weight. Support for the Views module is included.
  • The Image attach module allows an image to be attached to other nodes: pages, stories, or custom content types. You can specify which derivative size is shown in the node in both teaser and full view, and also the weight of the image among the node's content. The attached image is linked to the node for the actual image, allowing readers to see the full size image. Support for the Views module is included.
  • The Image import module allows mass importing of images from a directory on your webserver.

Other modules

Other modules that work with image module and its components include:

  • Image Gallery Access: control what user roles can view, edit, delete and post to each gallery
  • Image Gallery Management: use thumbnails to assign many images to a selected gallery in one action
  • Image cycle: allow image galleries to be displayed as sideshows using the jquery cycle plugin.
  • Image assist: upload and insert images into posts.

Getting started

You can:

  • view image handling messages in administer >> settings.
  • view lists and add image galleries at administer >> image galleries.
  • configure image sizes and file directories at administer >> settings >> image.
  • file issues, read about known bugs, and download the latest version on the Image project page.

Source of code?

suffering drupal - October 16, 2009 - 14:08

Which and where is the *.PHP or whatever script that generates an image gallery?
I want to get rid of the H3 under the thumbnails rather than changing it's corresponding CSS.
I didn't find any H3 in the image.module so it must be somewhere else.

Why isn't it standard policy in Drupal to offer the list of the related files and their location with every module instead of only the set up instructions. This would avoid a lot of lost hours of search for all Drupal community or at least the newbies like me.

Image Gallery functionality has its own module

TwoD - November 3, 2009 - 10:25

Try the Devel module and active its Theme Developer sub-module (D6 only). It allows you to click just about any element and have its theme function/template shown to you, along with the theming parents and alternate files or functions suggested in the code so you know what to implement in order to override the output.

For example, clicking the an image in a gallery, Theme Developer tells me theme_image_gallery_img() was used to render it. It can be found in /sites/*/modules/image/contrib/image_gallery/image_gallery.module. I'm also given the alternate theming functions Drupal searches for, highest priority first; test_image_gallery_img < phptemplate_image_gallery_img < zen_image_gallery_img < theme_image_gallery_img. I'm using a Zen theme named 'test' here, so I could simply implement test_image_gallery_img() in my template.php to override the markup, using the original function as a reference.

uploading of image in the image content-type to not require

markyctrigger - December 15, 2009 - 11:42

can someone heal me on how to set the uploading of image in the image content type to optional or not a required. what file am i going to modify?

The image association is required

TwoD - December 18, 2009 - 13:19

The image content type is for storing meta-data about the image itself, there would be no point to it if there is no image. Making the upload optional would probably break much code assuming that an image node means there's a corresponding file.

Please use comments for

joachim - December 16, 2009 - 22:33

Please use comments for clarifications specifically about this page -- file support requests and functionality questions in the issue queue.

For the amount of permisson needed...

ahimsauzi - February 3, 2010 - 23:44

This module does not work off the box!

For the amount of permission and setting required for a poor looking gallery one would think that a clear documentation is in order!
I know you guys work had and I do appreciate the effort but seriously a little clear direction would be nice!

Without knowing what you're

joachim - February 4, 2010 - 00:29

Without knowing what you're missing it's hard to provide it. What do you need? what went wrong? please file issues on the module to have the docs improved.

 
 

Drupal is a registered trademark of Dries Buytaert.