All platforms

Cloudflare CDN, Polish & Caching Rules for High-Resolution Photography Websites

Cloudflare can cut image delivery time dramatically, but default settings are not tuned for photography sites. HTML cached too aggressively serves stale content, while images cached too little hammer the origin. This playbook sets cache rules that match how a portfolio actually changes.

Updated October 26, 2026

The honest read before you invest another hour in Cloudflare.

Best for

Photographers who want a focused, low-friction web presence.

Watch out for

The template may look complete while the structure underneath still limits your positioning.

Rebuild fit

Assess the structure before committing to a full rebuild.

Where the platform starts working against you.

These are the structural symptoms that show up long before a redesign brief is written.

01

Images repeatedly hit the origin despite Cloudflare being enabled.

Root cause
Cache rules exclude the image directory or asset URLs change on every request.
The fix
Create a cache-everything rule for image and font paths, set a long edge TTL, and use immutable, versioned URLs.
02

Polish or AVIF appears enabled but browsers still receive original JPEGs.

Root cause
The feature is unavailable for the response type, or origin headers prevent transformation.
The fix
Verify content type and plan eligibility, enable Polish with AVIF where supported, and test with a fresh cache-busted URL.
03

Pages show old menus or pricing after a deploy.

Root cause
A cache-everything rule also matches HTML.
The fix
Bypass cache for HTML, use stale-while-revalidate for static assets, and purge the cache as part of the deploy pipeline.

A quick checklist for your current Cloudflare site.

Run this before you spend on traffic, a new template, or another round of cosmetic edits.

  1. 01

    Cache hit ratio for static assets is above 80 percent.

  2. 02

    HTML responses are not cached at the edge by default.

  3. 03

    AVIF or WebP is served to supported browsers with a valid fallback.

  4. 04

    TTFB is under 600ms in the primary market.

  5. 05

    A deploy purges HTML and updated assets without clearing everything.

What changes when the structure is rebuilt properly.

A new skin is not the same as a clearer path from first impression to enquiry.

Area

Caching

Before

A single cache-everything rule applies to HTML and assets alike.

After

HTML bypasses cache while images, fonts, and scripts use long-lived edge caching.

Area

Image pipeline

Before

Original JPEGs reach the browser at full resolution.

After

Polish and AVIF deliver compressed, format-appropriate images at the edge.

Area

Deploy hygiene

Before

Every deploy requires a full-zone purge and still leaves stale assets.

After

Versioned asset URLs and targeted purges update only what changed.

01

Cache the assets, not the HTML

Photography sites change pages often and assets rarely. A cache rule that treats both the same either slows the site or serves stale content.

Bypass cache for HTML and let the origin render current menus, pricing, and journal posts. Cache images, fonts, and hashed scripts aggressively because their URLs change when the content changes.

  • Bypass cache for text/html responses.
  • Use cache-everything for image, font, and hashed asset paths.
  • Pair long edge TTLs with versioned filenames.

02

Polish and AVIF without guessing

Cloudflare can convert and compress images at the edge, but the feature depends on plan, content type, and origin behavior. Enable it, then verify with response headers rather than assuming.

Test a cache-busted URL in a browser that supports AVIF and one that does not. Both should receive an appropriate format without visible quality loss.

  • Confirm the response content type before enabling transformation.
  • Test AVIF, WebP, and JPEG fallback paths separately.
  • Compare visual quality at full size, not only file size.

03

Rules that prevent stale content

Cache rules should be explicit and ordered. Put HTML bypass rules before broad asset rules so a deploy never serves an old page.

Add cache purge to the deploy pipeline and purge only the changed URLs. A full purge after every minor edit erases the performance benefit.

  • Order rules from most specific to most general.
  • Purge changed HTML and assets on deploy.
  • Monitor cache hit ratio and origin load after rule changes.

FAQ

Questions photographers ask before rebuilding.

Does Cloudflare improve SEO directly?

Not directly, but faster TTFB and image delivery improve Core Web Vitals, which supports SEO. Incorrect caching can hurt by serving stale or broken pages.

Should I cache HTML on a photography site?

Usually no. Portfolio and pricing pages change too often. Cache static assets and leave HTML to the origin or a short-lived edge cache with purge-on-deploy.

Why is AVIF not being served?

Check plan eligibility, content type, origin headers, and whether the URL was already cached in an older format. Test with a cache-busted URL.

Ready to move beyond Cloudflare template limits?

Use the Website Rebuild to improve the design, performance, conversion path, and SEO foundation of your current site without starting from a blank page.

Start the Website Rebuild