Skip to main content
Shopify hosts your product images on 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

The tenbyte.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 → OriginsAdd Origin:
Add Shopify as an Origin

Add Shopify as an Origin

Save. Your Tenbyte CDN domain can now fetch and optimize Shopify-hosted images.
Distribution URL

Domain Distribution URL

2. Add Tenbyte settings to the theme

In Shopify Admin → Online Store → Themes, find your theme, click ”…” → Edit code. Open Config/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:

5. Update theme image renders

Replace direct image renders with the snippet. The before/after pattern: Before:
After:

Responsive srcset example

Verify

  1. Open a product page.
  2. View source / inspect element.
  3. Confirm image URLs go to your-distribution.tenbytecdn.com instead of cdn.shopify.com.
  4. In DevTools Network, check content-type: image/webp on supported browsers.

Operational tips

  • Ship behind the checkbox. The enableTenbyte toggle 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