Usage Examples¶

Real-World Scenarios¶
Example 1: Simple Ads Block¶
Objective: Create a flexible ads block with image and custom URL.
Setup:
-
Create Custom Block Type: Settings → Block types → Add block type - Name: "Featured Ad" - Machine name:
featured_ad -
Add fields: - field_ad_image (Image) - field_ad_link (Link)
-
Configure display: - Go to: Manage Display for
featured_ad- Selectfield_ad_imageformatter:Image wrapped within link field- Configure: Link image to →field_ad_link -
Create ads: - Create instances with image + custom URL - Drag block into region - Images link to configured URLs
Result: Reusable ad blocks with linked images and full translation support.
Example 2: Multi-Image Carousel with Paragraphs¶
Objective: Build flexible content carousels with multiple linked images.
Setup:
-
Create Paragraph Type: Manage Paragraphs → Add Paragraph type - Name: "Product Carousel" - Machine name:
product_carousel -
Add fields: - field_carousel_images (Image, unlimited values) - field_carousel_links (Link, unlimited values)
-
Configure display: - Formatter:
Image wrapped within link field- Link image to:field_carousel_links -
Use Paragraphs in content: - Add paragraph to article/page - Fill images and corresponding links - Frontend displays linked image carousel
Bonus: Use Paragraphs Translation for multi-language carousels.
Result: Flexible, granular content blocks with linked images per language.
Example 3: Product Showcase¶
Objective: Display product images linked to product pages or external vendors.
Setup:
-
Content Type: Article - field_product_image (Image) - field_product_url (Link) — Can link to another product node or external URL
-
Display configuration: - Formatter:
Image wrapped within link field- Link to:field_product_url -
Optional enhancements: - Use Image styles for responsive sizing - Add Link Attributes module for
target="_blank"- Use Link Target module for open-in-new-window option
Result: Product images automatically link to product pages or vendor sites.
Example 4: Multi-Language Linked Images¶
Objective: Support linked images in multiple languages.
Setup:
- Enable Content Translation module
-
Create Node Type with: - field_image (Image, translatable) - field_link (Link, translatable)
-
Configure as above (Link image to:
field_link) -
Translate content: - Add node with image + link in English - Translate to Spanish with different image + link - Formatter respects language-specific values
Result: Language-specific linked images with full i18n support.
Integration Tips¶
With Other Modules¶
Link Attributes + Image Link Formatter: - Add custom HTML attributes to links wrapping images - Useful for CSS classes, data attributes, etc.
Link Target + Image Link Formatter: - Set links to open in new window - Works automatically with image wrapping
Paragraphs + Image Link Formatter: - Create flexible page layouts with linked image blocks - Reuse across multiple content types
Advanced: Custom Link Fields¶
The formatter works with any Link field, enabling creative setups:
- Link to other nodes (entity reference through Link field)
- Link to external URLs
- Link to media library items
- Link to taxonomy terms
All are supported as long as they're stored in a Link field.
Troubleshooting Examples¶
Q: Images and links don't match¶
A: Check that image and link fields have the same delta values (position).
- Image field value 0 → Link field value 0
- Image field value 1 → Link field value 1
- etc.
Q: Can I link image 0 to link 2?¶
A: Not with this module (delta matching). Instead, use Linked Field module or custom code.
Q: Can I link multiple images to one link?¶
A: Not directly. Workaround: Add multiple copies of the link field.