skip to content

As the lead for a marketplace's photo pipeline, how would you choose between Cloudflare Images and running your own resizing service behind Cloudflare?

level: principalimportance: should knowfreq 15%

answer

  1. which unit is billed, and how often
  2. catalogue size versus traffic
  3. who strips GPS and patches decoders
  4. private photos need signed URLs
  5. keep your own URL scheme

basics

~20 s

Compare cost shape, control and operating burden: Cloudflare Images bills monthly unique transformations or stored and delivered images, a self-run resizer bills compute and engineers. Decide on catalogue size versus traffic, privacy, processing needs and exit cost.

solid answer

~50 s

I would model three options: transformations over originals we store ourselves, Images hosted storage with variants, and a self-run resizer behind the CDN. Transformations bill **unique** source-and-options combinations per calendar month, so a large catalogue requested in several sizes every month pays again each month; hosted storage bills per 100,000 images stored plus per 100,000 delivered, which favours big catalogues with modest traffic. A self-run service gives full control of processing and limits, but we would own CPU spikes after purges, decoder security patches, EXIF stripping, format encoders and abuse controls. Privacy matters: signed URLs exist only for hosted images, and transformations are cached publicly. Whatever we choose, I would publish our own preset URLs through a Worker or Transform Rules so the backend can change later, and I would revisit the choice when catalogue size, traffic or processing needs shift.

go deeper

for a junior

Recall the two Cloudflare shapes: transformations over your own originals, and hosted storage with variants.

for a middle

Explain the billing units: unique transformations per month versus images stored and delivered, and when each is counted.

for a senior

Show the operational risks of each path: purge-driven origin load, decoder security, metadata stripping and abuse controls.

for a principal

Model cost shape against catalogue size and traffic, weigh control against operating burden, and keep an exit through your own URL scheme.

## The decision A marketplace needs every seller photo at several sizes, in modern formats, quickly, and without leaking private drafts or sellers' GPS coordinates. A lead can buy that from **Cloudflare Images**, in one of two shapes, or run a **self-hosted resizing service** that Cloudflare caches. No option wins everywhere; the job is to make the cost shape and the operational burden explicit. ## The three realistic options | | Transformations (originals in your storage) | Hosted Images (originals in Images) | Self-run resizer behind the CDN | |---|---|---|---| | Billed unit | unique transformations per calendar month | images stored, images delivered | compute, storage, people | | Free allowance | 5,000 unique transformations a month | none; storage needs the Paid plan | none | | Size control | URL options, or Worker presets | named variants; flexible variants optional | whatever you build | | Private images | not designed for it; cached publicly | `requireSignedURLs` and signed URLs | whatever you build | | Limits | 100 MB files, 100 megapixels | 10 MB uploads, 100 megapixels | your hardware | ## Cost shape, not unit price - **Transformations recur monthly.** A photo at four sizes requested in a month is four unique transformations that month and four again next month. Beyond the first 5,000, the Paid plan charges $0.50 per 1,000. A catalogue of 200,000 active photos in four sizes is up to 800,000 unique transformations a month, about $400 at that rate, while repeat views within the month cost nothing extra. `format=auto` counts once however many formats it produces. - **Hosted storage flips the axis.** $5 per 100,000 images stored and $1 per 100,000 images delivered: the same 200,000 photos cost $10 a month to store, and delivery scales with page views, not with sizes. Serving a hosted image through its delivery URL counts as delivered, not transformed. Resizing hosted bytes through the Images binding counts as transformed. - **Self-run cost hides in people.** Servers are cheap until a purge sends every derivative back to the origin at once, or a new format encoder needs tuning, or a decoder vulnerability needs patching on a weekend. So the first input is a model: active catalogue size, sizes per photo, monthly page views, and their growth. ## Risk and control - **Untrusted uploads.** Decoding images that strangers upload is an attack surface. Cloudflare runs the decoders for you; a self-run service must sandbox and patch them. - **Metadata privacy.** For JPEG output Cloudflare's default `metadata=copyright` discards everything but the copyright tag, including GPS; WebP and PNG output always drop metadata. A self-run pipeline must do this deliberately. - **Private drafts.** Hosted images offer `requireSignedURLs` with expiring signed URLs; transformations do not, and Cloudflare advises against resizing per-visitor private images through its public cache. - **Abuse.** With transformations, the zone's Sources setting and presets bound what outsiders can make; a self-run service needs its own allow list and size caps. - **Processing needs.** Unusual operations such as custom pipelines or exotic formats may outgrow the parameter set; the Images binding's chained operations, overlays and text often close that gap before self-running is justified. ## Keeping the exit open The costliest lock-in is URL shape. Pages that embed `imagedelivery.net` or `/cdn-cgi/image/` URLs everywhere are expensive to move. Publish your own scheme, for example `/img/<preset>/<photo-id>`, implemented by a Worker or a Transform Rule, so the backend can change from transformations to hosted storage or to a self-run service without rewriting listings. Keep originals in storage you control unless hosted storage's benefits, such as signed URLs and direct uploads, are worth it; hosted images can be exported, but plan the move rather than assume it. ## A decision rule a lead can defend 1. Start with transformations over your own originals when the catalogue is modest and photos are public. 2. Move to hosted storage when private photos, signed URLs or a very large active catalogue with steady traffic make its pricing shape cheaper. 3. Self-run only when processing needs or scale clearly exceed what the product does, and only with an owner for security patching and on-call. 4. Record the assumptions: catalogue size, sizes per photo, traffic and processing needs. Revisit when they move.

  • What numbers would you collect before deciding?
    The active catalogue size, the number of sizes each photo is served in, monthly page views and growth, the share of private or draft photos, and any processing the product needs beyond resizing and format conversion. Those set the monthly unique-transformation count, the delivered-image count and whether the parameter set suffices.
  • How do you keep the choice reversible?
    Publish your own preset URL scheme through a Worker or a Transform Rule instead of embedding `/cdn-cgi/image/` or `imagedelivery.net` URLs in pages, and keep originals in storage you control unless hosted features justify moving them. Then a backend change is a routing change, not a content migration.

  • Comparing only the per-1,000 price without counting monthly unique transformations
  • Assuming transformations bill each derivative only once, ever
  • Using public transformations for private seller drafts
  • Self-running a resizer without owning decoder patches and on-call
  • Embedding vendor delivery URLs directly in every page template

Assumes Cloudflare Images pricing and features as of 2026-10-10, including per-unique-transformation billing for the Images binding since 2026-07-01.