Product Images
Upload and manage product media.
Updated
On this page
Overview
Products support multiple images including a main image and a gallery. Images are served from a CDN for fast loading.
Image Data
import dash from "@/lib/dash"
const { product } = await dash.products.get("blue-dream")
// Main image
console.log(product.main_image) // "https://cdn.dashfordevs.com/..."
// Gallery images
product.images.forEach(img => {
console.log(img.image, img.alt_text, img.order)
})
// Variation-specific images
product.attributes[0].options.forEach(opt => {
console.log(opt.value, opt.image) // Each variation can have its own image
})