DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsMedia & FilesImage URLs & CDN
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Upload FilesImage URLs & CDNMedia LibraryFile Size Limits
Analytics & Tracking
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

Image URLs & CDN

Get CDN URLs for product and category images.

Updated March 29, 2026

On this page
  • Overview
  • Image URL Format
  • Fetching Media by Name
  • Media Folders
  • Next.js Image Optimization
  • REST API
  • Next Steps

Overview

All images and files served through DashForDevs use a CDN (Content Delivery Network) for fast, global delivery. Image URLs are permanent and optimized for web performance.

Image URL Format

Images are served from https://cdn.dashfordevs.com/ or your configured S3/CDN domain.

typescript
const { product } = await dash.products.get("blue-dream")
console.log(product.main_image)
// "https://cdn.dashfordevs.com/media/products/blue-dream-main.jpg"

Fetching Media by Name

typescript
import dash from "@/lib/dash"

const { file } = await dash.media.getByName("hero-banner")
// file = { id, name, url, alt_text, width, height }

Media Folders

typescript
const { folder, items } = await dash.media.getFolder("banners")
// items = [{ id, name, url, alt_text, width, height }, ...]

Next.js Image Optimization

Use Next.js <Image> component with CDN URLs for automatic optimization:

typescript
import Image from "next/image"

// Add CDN domain to next.config.js
// images: { remotePatterns: [{ hostname: "cdn.dashfordevs.com" }] }

<Image
  src={product.main_image}
  alt={product.name}
  width={400}
  height={400}
/>

REST API

shell
# Get file by name
GET /storefront/media/by-name/hero-banner
X-API-Key: pk_live_your_key

# Get folder contents
GET /storefront/media/folder/banners
X-API-Key: pk_live_your_key

Next Steps

  • Media Library — Managing media in the dashboard
  • File Size Limits — Upload restrictions
PreviousUpload FilesNextMedia Library

On this page

  • Overview
  • Image URL Format
  • Fetching Media by Name
  • Media Folders
  • Next.js Image Optimization
  • REST API
  • Next Steps