Skip to content

Image Link Formatter

Welcome to the Image Link Formatter documentation. This Drupal module allows you to wrap images within custom link fields, enabling flexible and powerful image linking workflows.

Quick Start

  1. Install the module: composer require drupal/image_link_formatter
  2. Enable Image and Link core modules (if not already enabled)
  3. Go to Manage Display for any entity with image and link fields
  4. Select the formatter Image wrapped within link field
  5. Configure which link field to use

That's it! Your images are now wrapped in custom links.

Key Features

  • Unified Link Wrapping — Wrap image fields in URLs from custom link fields
  • Works with Core Entities — Nodes, Custom Blocks, Taxonomy Terms, Users, etc.
  • Responsive Images — Use regular or responsive image formatters
  • Multi-valued Support — Link fields by delta value matching
  • Trait-based Architecture — Extensible design for custom formatters
  • Drupal 10+ — Full PHP 8.1+ type support

What's Inside?

Common Use Cases

Ads Block

Create a flexible ads block with multiple images and custom URLs.

Custom Block Type (block_content)
├── Image field
└── Link field

Build a paragraph-based carousel with linked images in multiple languages.

Paragraph
├── Repeating images
├── Repeating links
└── Translation support (Core)

Product Showcase

Display product images linked to product pages or external URLs.

Support