Having problem in Drupal 7 in inserting or making an Image field clickable as a hyperlink to a custom URL either relative (internal) or absolute (external) link? Consider using the Image Link Formatter module. The module allows for:

  • An easy integration between the Image field and the Link field (Link module)
  • Making the image field clickable to a custom link field (defined by the Link module)
  • Easy implementation of hyperlinking Image field in Views without re-writing output

To use the Image Link Formatter module in Drupal:

  1. Download and enable both modules: Link module and Image Link Formatter module
  2. Optional module - Views (if implementing via views output)
  3. In your content type, create an Image field, configure then save
  4. In the same content type, create also a Link field, configure then save
  5. Go back to Structure > your Content Type > Manage Display > on the Image field created, click the gear icon to edit Format of the field
    Inserting Image Link Formatter in your Drupal content type
  6. Under "Link image to", select the defined field representing the Link field you have created - this will now make the hyperlink between the two fields possible

In Views implementation (without having to rewrite any field views output):

  1. In your Views, add the Image field
  2. Click on the Image field to edit settings, then uner Formatter select Image Link Formatter
    Inserting link in Image field in Drupal Views

Hope this helps!

Leave a Comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
To prevent automated spam submissions leave this field empty.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
13 + 7 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Get reliable web hosting services

Recurring donation

Make Donation

  • Other: $

Donate now

Single donation

Make Donation

  • Other: $

Donate now