This simple formatter module solves a typical use case in which, when clicking on a preview image (e.g. JPG or PNG file), a PDF file specified as a file field in the same node should be opened.
To use the formatter, click on the Manage Display tab of a content type that contains at least an image field and a file field. Then, in the Format column of the image field, select Image linked to file. To specify the format settings, click on the button with the gear to reveal the Image style selector, the Image link selector, and the Open image in a new window or tab checkbox.
Any of the available image style options can be selected for the image and any of the file fields can be selected for the linked file. Optionally, the linked file can be made to open in a new window or tab, rather than in the same window or tab.
After your selection, click the Update button and then click the Save button.

Project information

Releases