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:
- Download and enable both modules: Link module and Image Link Formatter module
- Optional module – Views (if implementing via views output)
- In your content type, create an Image field, configure then save
- In the same content type, create also a Link field, configure then save
- Go back to Structure > your Content Type > Manage Display > on the Image field created, click the gear icon to edit Format of the field
- 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):
- In your Views, add the Image field
- Click on the Image field to edit settings, then uner Formatter select Image Link Formatter
Hope this helps!