Infrastructure Guide

Cloudflare & Global CDN Setup

How to configure edge cache headers and Cloudflare Page Rules for optimal image delivery speeds.

1. Edge Cache TTL Headers

Shrinkify automatically responds with standard HTTP cache headers for static image assets:

Cache-Control: public, max-age=31536000, immutable
Vary: Accept, Accept-Encoding
Access-Control-Allow-Origin: *

2. Cloudflare Cache Rule Configuration

To maximize edge hit ratios in your Cloudflare dashboard:

  • Navigate to Caching > Cache Rules in your Cloudflare dashboard.
  • Set Field: URI Path contains /uploads/ or .webp.
  • Set Edge Cache TTL to Respect Origin or 1 Month.

WordPress Plugin Users

If you use our official WordPress plugin, edge caching with Cloudflare, LiteSpeed Cache, or WP Rocket is handled automatically out of the box.

View WordPress Plugin