Usage
{{< image src = "/images/photo.jpg" [alt = "Photo description"] [srcClass = "full"] [srcLink = "/gallery"] [process = "fit 300x200"] >}}Displays images with automatic processing, captions, and optional linking. Self-close it: {{<hw t=“image” … />}}
Description
Displays images with intelligent resource handling, automatic processing, and optional captions. Supports both page bundle resources and global assets with Hugo’s image processing pipeline.
Parameters
indicates required parameter
src =
"string"REQUIRED
Path to image file (page resource or global asset)
alt =
"string"
Alt text for accessibility (falls back to text parameter)
text =
"string"
Caption text (also used as fallback alt text)
header =
"string"
Caption header (e.g., ‘Figure 1’)
srcClass =
"string"
CSS classes on the
itself (there is no wrapper).
full = picnic width 100%, filling the column even past the image’s own widthsrcLink =
"string"
URL to wrap around the image (makes image clickable)
process =
"string"
Hugo image processing parameters (e.g., ‘fit 300x200’)
Examples
Simple image display using hw shortcode
{{<hw t="image"
src="/images/product-dashboard.png"
alt="Product dashboard screenshot" />}}Use hw shortcode with src and alt for basic accessible image display. A wide image shrinks to the column; a narrow one keeps its own size
Image with caption and processing
{{<hw t="image"
src="/images/architecture-diagram.png"
header="Figure 1"
text="System architecture showing microservices communication patterns and data flow."
process="fit 600x400" />}}Add captions and processing for professional documentation images
Clickable image gallery item
{{<hw t="image"
src="/images/gallery/project-screenshot.jpg"
alt="Project management interface"
srcLink="/gallery/project-screenshots"
text="Click to view full gallery" />}}Make images clickable with srcLink for gallery and navigation functionality
Technical documentation with linked diagrams
# API Integration Guide
{{<hw t="include" from="docs/api-intro.md">}}
{{<hw t="image"
src="/images/docs/api-flow-diagram.svg"
header="Diagram 1"
text="Authentication flow showing token exchange and API request validation process."
srcLink="/docs/authentication"
process="fit 800x500" />}}
{{<hw t="accordion">}}
{{<hw t="acc-tab" header="Implementation Examples">}}
{{<hw t="image"
src="/images/docs/code-example.png"
header="Code Example"
text="JavaScript implementation showing proper error handling and token refresh."
srcClass="full" />}}
{{</hw>}}
{{</hw>}}Combine with other partials for comprehensive technical documentation
Product showcase with optimized images
{{<hw t="table">}}
{{<hw t="thead">}}
{{<hw t="trth">}}Product Features{{</hw>}}
{{</hw>}}
{{<hw t="tbody">}}
{{<hw t="trtd">}}
{{<hw t="image"
src="/images/features/analytics.jpg"
text="Advanced analytics dashboard with real-time data visualization and custom reporting capabilities."
srcLink="/features/analytics"
process="fit 400x300" />}}
{{</hw>}}
{{<hw t="trtd">}}
{{<hw t="image"
src="/images/features/collaboration.jpg"
text="Team collaboration tools with shared workspaces and real-time editing."
srcLink="/features/collaboration"
process="fit 400x300" />}}
{{</hw>}}
{{</hw>}}
{{</hw>}}
{{<hw t="caption" text="Click any image to explore detailed feature documentation">}}Embed in tables and use consistent processing for product galleries
Blog post with inline images
# Getting Started with Our Platform
{{<hw t="blog" count="1">}}
## Quick Setup Process
Setting up your account is straightforward:
{{<hw t="image"
src="/images/tutorials/setup-step1.png"
header="Step 1"
text="Create your account by filling out the registration form with your basic information."
process="fit 500x300" />}}
{{<hw t="image"
src="/images/tutorials/setup-step2.png"
header="Step 2"
text="Configure your workspace settings and invite team members to collaborate."
process="fit 500x300" />}}
{{<hw t="banner" text="Need help with setup? Our support team is available 24/7 to assist you.">}}Perfect for tutorials with step-by-step visual instructions
Additional Information