Usage
{{< media src = "/media/video.mp4" [srcIsVideo = "true"] [srcIsImage = "false"] >}}Intelligently displays images or videos based on file type detection
Description
A smart media router that automatically determines whether to display content as an image or video based on file extension detection. Provides a unified interface for mixed media content.
Parameters
indicates required parameter
src =
"string"REQUIRED
Path to media file (image or video)
srcIsVideo =
"boolean"false
Override to force video handling (automatically detected)
srcIsImage =
"boolean"false
Override to force image handling (automatically detected)
Examples
Auto-detecting media display using hw shortcode
{{<hw t="media" src="/content/demo.mp4">}}
{{<hw t="media" src="/images/screenshot.png">}}Use hw shortcode with src parameter - media type is automatically detected
Mixed media gallery with consistent interface
# Project Gallery
{{<hw t="accordion">}}
{{<hw t="acc-tab" header="Screenshots">}}
{{<hw t="media" src="/images/gallery/dashboard.png">}}
{{<hw t="media" src="/images/gallery/settings.jpg">}}
{{<hw t="media" src="/images/gallery/reports.webp">}}
{{</hw>}}
{{<hw t="acc-tab" header="Demo Videos">}}
{{<hw t="media" src="/videos/product-demo.mp4">}}
{{<hw t="media" src="/videos/tutorial-intro.mkv">}}
{{</hw>}}
{{</hw>}}
{{<hw t="caption" text="All media is automatically optimized for web delivery">}}Perfect for mixed media galleries where content types vary
Documentation with varied media types
# API Integration Tutorial
## Step 1: Authentication Setup
{{<hw t="media" src="/images/tutorials/auth-setup.png">}}
## Step 2: Making Your First Request
{{<hw t="media" src="/videos/first-request-demo.mp4">}}
## Step 3: Handling Responses
{{<hw t="table">}}
{{<hw t="thead">}}
{{<hw t="trth">}}Response Examples{{</hw>}}
{{</hw>}}
{{<hw t="tbody">}}
{{<hw t="trtd">}}
{{<hw t="media" src="/images/docs/success-response.svg">}}
{{</hw>}}
{{<hw t="trtd">}}
{{<hw t="media" src="/images/docs/error-response.svg">}}
{{</hw>}}
{{</hw>}}
{{</hw>}}
{{<hw t="banner" text="Need help? Check out our video tutorials and interactive examples">}}Mix images and videos seamlessly in technical documentation
Product showcase with comprehensive media
{{<hw t="feature-group">}}
{{<hw t="feature"
header="Product Demo"
text="See our platform in action with this comprehensive walkthrough."
src="/videos/product-overview.mp4"
link="/demo">}}
{{<hw t="feature"
header="User Interface"
text="Clean, intuitive design that your team will love to use."
src="/images/ui-showcase.png"
link="/interface">}}
{{</hw>}}
## Detailed Media
{{<hw t="block"
header="Platform Overview"
description="Complete visual guide to our platform's capabilities."
src="/videos/platform-tour.mp4"
srcOn="right">}}
**What you'll see:**
- Dashboard navigation
- {{<hw t="include" from="features/overview-highlights.md">}}
- Advanced customization options
{{<hw t="media" src="/images/platform-architecture.svg">}}
{{</hw>}}Combine with other partials for rich multimedia presentations
Blog post with inline media
# Building Modern Web Applications
{{<hw t="blog" count="1">}}
## Visual Development Process
Our development workflow combines the best of modern tooling:
{{<hw t="media" src="/images/blog/workflow-diagram.png">}}
Here's a quick demonstration of our build process:
{{<hw t="media" src="/videos/build-process.mp4">}}
{{<hw t="accordion">}}
{{<hw t="acc-tab" header="Code Examples">}}
{{<hw t="media" src="/images/code/component-structure.png">}}
{{<hw t="caption"
header="Code Structure"
text="Our component architecture promotes reusability and maintainability">}}
{{</hw>}}
{{<hw t="acc-tab" header="Performance Metrics">}}
{{<hw t="media" src="/videos/performance-analysis.mp4">}}
{{</hw>}}
{{</hw>}}
{{<hw t="children">}}Perfect for blog posts that need both static and dynamic media content
Case study with supporting media
# Case Study: E-commerce Platform Migration
{{<hw t="item"
header="Project Overview"
description="Complete migration of legacy e-commerce platform to modern microservices architecture."
src="/images/case-studies/ecommerce-before-after.png"
meta="6 month project • 500% performance improvement">}}
## Architecture Evolution
**Before:** Monolithic architecture
{{<hw t="media" src="/images/case-studies/architecture-before.svg">}}
**After:** Microservices with event-driven design
{{<hw t="media" src="/images/case-studies/architecture-after.svg">}}
## Implementation Timeline
{{<hw t="media" src="/videos/migration-timeline.mp4">}}
{{</hw>}}
{{<hw t="cover" from="case-studies/client-testimonial">}}Support case studies with mixed media for compelling storytelling
Additional Information