Image Download Formatter example usage

The Image Download Formatter provides a simple way for you to show an image download button when displaying image fields. When a user clicks on the download button the original image is sent to them for download, not opened in the browser.

Development backed by Technocrat

Features

There are two main parts to this module:

  1. A Display Formatter for image fields that will output a download button with the image
  2. A Drupal Menu callback to retrieve an image file and send it to a user in a way that ensures they're asked to save it locally

Usage

After the module has been installed and enabled, a new display type will be available for any image field.

  1. Go to the display setting for an entity (ie. node, user) containing an image field
  2. Select the "Image Download" display for an image field
  3. Optionally choose an image style for the Image Download display
  4. Save the entity display settings

Now when you view that entity, the image field will display a download button alongside the image. Note that the image style you choose is for the display of the image, not for the download. When a user clicks on Download, they will be getting the original image, with no style applied.

Future Plans

This is deliberately a very simple field formatter. There could be more options, but for now it is mostly a slight change to the Drupal core image field formatter. Feature requests are welcomed, however they should be accompanied by a code patch to get things started.

Supporting organizations: 
backed development of first iteration.

Project information

Releases