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¶
- Install the module:
composer require drupal/image_link_formatter - Enable Image and Link core modules (if not already enabled)
- Go to Manage Display for any entity with image and link fields
- Select the formatter
Image wrapped within link field - 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?¶
- User Guide — Installation, configuration, and usage examples
- Developer Guide — Architecture, extending, and advanced patterns
- API Reference — Auto-generated PHP documentation
- AI & Dev Specs — Spec-driven development files and AI planning documents
- Maintainer Guide — Release management, CI/CD pipeline, and tooling
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
Content Carousel¶
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¶
- Issues & Bug Reports: GitLab Issues
- Code Repository: git.drupalcode.org
- Drupal.org Project Page: drupal.org/project/image_link_formatter