Product Media
Each product can have a primary image, a media gallery, and rich descriptions.
Adding Media to a Product
- Open a product in the editor
- Go to the Media section
- Click Add Media to open the media picker
- Select images, videos, or audio from your library
- Drag to reorder
The first item in the media list is treated as the primary product image, displayed prominently in product cards and the storefront.
Primary Image
Set the primary image in the product editor:
- Upload an image to the media library
- Copy its URL
- Paste it into the Image field in the product editor
- Save
Alternatively, the first media item automatically becomes the primary image.
Media Types
| Type | Supported Formats | Use Case |
|---|---|---|
| image | JPEG, PNG, WebP, AVIF | Product photos |
| video | MP4, WebM | Product demos, unboxing |
| audio | MP3, WAV | Music, podcasts |
The storefront's ProductMedia component automatically renders the correct player based on media type.
Storefront Display
Use the ProductMedia component to show a product's gallery:
<ProductMedia>
<Grid cols={4} gap={2}>
<ProductMediaView>
<ProductMediaItem
class="aspect-square object-cover rounded cursor-pointer
border-2 hover:border-primary transition-colors"
/>
</ProductMediaView>
</Grid>
</ProductMedia>
The ProductMediaItem component handles images, videos, and audio — no type checking needed.
Media Limits
| Limit | Value |
|---|---|
| Max file size | 10 MB |
| Max files per upload | 50 |
| Supported image formats | JPEG, PNG, WebP, AVIF, GIF |
| Supported video formats | MP4, WebM |
| Supported audio formats | MP3, WAV, OGG |
Alt Text
Always set alt text on images — it improves accessibility and SEO. In the media library, set the alt field for each image. The ProductImage component renders it automatically.