cdn.shopify.com. By proxying that origin through Tenbyte CDN, you get on-the-fly resizing, format conversion, and faster regional delivery without changing how you upload products.
How the integration works
Thetenbyte.liquid snippet rewrites Shopify CDN URLs to Tenbyte URLs and appends transform params.
Prerequisites
- A Shopify store with theme edit access.
- A Tenbyte distribution with Image Optimizer enabled.
- Backup your theme before editing — Online Store → Themes → ”…” → Download theme file.
1. Add Shopify as an origin
In your Tenbyte distribution → Origins → Add Origin:| Field | Value |
|---|---|
| Origin Name | Origin-Shopify |
| Type | Hostname |
| Domain / IP | https://cdn.shopify.com |


2. Add Tenbyte settings to the theme
In Shopify Admin → Online Store → Themes, find your theme, click ”…” → Edit code. OpenConfig/settings_schema.json, scroll to the bottom, and append this block. Save.
settings_schema.json
3. Create the tenbyte.liquid snippet
In Snippets, create tenbyte.liquid and paste:
tenbyte.liquid
4. Enable Tenbyte in theme settings
Online Store → Themes → Customize. In the left panel, open the Tenbyte section under General settings:| Field | Value |
|---|---|
| Enable Tenbyte | ✓ |
| Tenbyte URL endpoint | https://your-distribution.tenbytecdn.com/ |
| Shopify CDN domain | //cdn.shopify.com |
5. Update theme image renders
Replace direct image renders with the snippet. The before/after pattern: Before:Responsive srcset example
Verify
- Open a product page.
- View source / inspect element.
- Confirm image URLs go to
your-distribution.tenbytecdn.cominstead ofcdn.shopify.com. - In DevTools Network, check
content-type: image/webpon supported browsers.
Operational tips
- Ship behind the checkbox. The
enableTenbytetoggle lets you roll back instantly. - Test in a draft theme. Edit a copy, preview, then publish.
- Watch cache hit ratio. Shopify pages reuse images aggressively; CHR should climb past 95%.
- Cap widths. Match Shopify’s preset image sizes (320, 480, 640, 960, 1280, 1600) so you don’t fragment the cache.
- Lazy-load below the fold.
loading="lazy"is supported in Liquid<img>tags.
Troubleshooting
| Symptom | Fix |
|---|---|
Images still hit cdn.shopify.com | enableTenbyte is off or tenbyteUrl is blank in theme settings. |
404 from Tenbyte | Origin not added or wrong path; the path on Tenbyte must match Shopify’s. |
| Layout shifts | Add width and height to <img> so the browser reserves space. |
| Broken theme | Restore from the backup you took in step 0. |