Cloudinary CDN for Shopify
Last updated: Nov-12-2025
This guide shows you how to set up Cloudinary's image and video optimization and delivery for your Shopify store using theme-level changes. This approach keeps Shopify as the origin for your media files, while Cloudinary acts as a caching proxy that optimizes and delivers them. You can typically complete this implementation in one day and boost site performance by up to 30%.
Prerequisites
- A Cloudinary account with access to the Assets product???Is a free account sufficient? Where should I link to here? The sign-up page? Support?
- At least one Shopify store where you want to sync assets
Overview
In order to set up your Shopify Cloudinary integration, you'll need to do the following:
- Set up your Cloudinary account to allow delivery of the Shopify store's images and videos
- Edit your store theme code to use Cloudinary image URLs instead of Shopify image URLs
Stage 1: Cloudinary account setup
Set up upload mapping
Upload mappings allow Cloudinary to fetch and deliver assets from your Shopify store. An upload mapping maps a Cloudinary folder to an external URL, enabling Cloudinary to act as a caching proxy for your Shopify media.
To set up an upload mapping:
- Go to the Auto Upload Mapping tab of the Upload page in Console Settings.
- Click Add Mapping.
- In the Source URL prefix field, enter your Shopify CDN URL:
https://store-name.myshopify.com/cdn/shop/, replacingstore-namewith your actual Shopify store ID. - In the Target folder field, enter a folder name, such as
shop.
Get your account details
You'll need your Cloudinary cloud name to build delivery URLs for your Shopify assets.
To find your cloud name:
- Go to the Product Environments page of the Console Settings.
- Locate the Cloud Name for the product environment you want to use (displayed as a random string when you first sign up).
- Record this value for use in the theme setup.
Test Cloudinary URL structure
To test delivering an optimized, resized image or video, take a URL from your store and test it.
For images, given a URL from your store:
If you want optimized delivery with width 1000, you'll need to convert the Shopify URL to:
For videos, given a video URL:
Replace it with the optimized delivery URL:
<your_cloud_name>/video or <your_cloud_name>/image in the prefix, depending on which file type you want to optimize and deliver.Stage 2: Theme setup
Add Cloudinary settings to theme configuration
Set Cloudinary Image and Video hostnames as theme variables in the Theme settings (settings_schema.json).
Edit the settings_schema.json and add the following global theme settings:
Add the cloudinary-url snippet
Add the cloudinary-url.liquid snippet to the /snippets/ directory of your theme. This snippet enables you to replace Shopify image and video URLs with Cloudinary URLs throughout your theme files.
For implementation examples showing how to use the cloudinary-url snippet in different themes, see the cloudinary-shopify-theme-delivery repository.
For additional assistance with your implementation, contact Cloudinary support.