Cloudflare Added Image Analytics. A Private Image Can Still Have a Public Thumbnail.
Cloudflare launched hosted-image delivery analytics on November 20, including visibility into source images, predefined variants, and inline configurations. That is useful for a photo gallery, but a successful thumbnail
Cloudflare launched hosted-image delivery analytics on November 20, including visibility into source images, predefined variants, and inline configurations. That is useful for a photo gallery, but a successful thumbnail request deserves one more question: should it have succeeded? Cloudflareβs existing variant settings can make a particular variant publicly accessible even when the image requires a signed URL.
AI disclosure: This article was generated with AI assistance using Keith Azodehβs public project documentation and the linked primary sources. It has not been reviewed by Keith before publication.
The dashboard is new. The access behavior is already documented in Cloudflareβs predefined-variant guide. Its βAlways allow public accessβ option is an explicit exception to private-image delivery.
The small image is still the photo
A gallery thumbnail is easy to treat as presentation plumbing. It is smaller, cropped, and loaded before someone opens the detailed view. None of those properties establishes that it is suitable for public viewing.
Consider a proposed event gallery with two kinds of image: a public event flyer and attendee photos intended only for admitted participants. A square crop of an attendee photo would inherit that audience requirement. The fact that the larger version is protected would not justify an anonymous thumbnail route.
The public From Strangers case study provides the application context. Keith describes phone-based sign-in, QR check-in, gated participation, photo sharing, and event-specific links, using a static frontend with Firebase services.
The case study does not specify Cloudflare Images or the delivery policy for its photos. The design discussed here is a proposed extension for an event app that requires private photo delivery, not a report of an exposure in From Strangers.
That distinction matters when translating a familiar product requirement into a different image-hosting system.
Define variants as delivery contracts
For the proposed gallery, start with a short list of intended views. A compact grid tile might crop to a square. A larger detail view might preserve the full composition. Each definition needs an audience policy alongside its dimensions and fit behavior.
Cloudflareβs variant guide distinguishes cover, which fills the requested area and can crop, from contain, which preserves aspect ratio inside the bounds. Those choices affect presentation. The public-access override affects who can retrieve the result.
Put both decisions in the same review.
A proposed variant inventory could record the view name, width and height, fit mode, and whether public access is permitted. For attendee-photo views, leave the public override off. Review the actual saved configuration rather than assuming a name such as βthumbnailβ implies either public or private behavior.
For a public flyer, public delivery can be an intentional product choice. Keep that choice separate from the attendee-photo contract.
A shared variant definition is especially worth checking: its access exception can apply when that variant is requested for a private image. Creating a convenient public preview deserves the same scrutiny as creating any other public delivery route.
Flexible resizing has a boundary
Cloudflareβs flexible-variant documentation says dynamic variants are disabled by default and cannot be used for images that require signed delivery URLs.
That restriction changes the implementation plan. If private delivery is required, an arbitrary width in an image URL is not a reason to relax the imageβs access policy.
Within this hosted-image approach, a practical proposed design is to use predefined variants for the private galleryβs required views. Add another deliberate preset when a real layout needs it. More presets require maintenance, but they give the team a finite list of outputs and access settings to inspect.
Cloudflareβs private-image guide documents backend-generated signed URLs. For an event app, the backend would first establish whether the requester may view the image, then generate the appropriate delivery URL. Signing a URL and deciding who deserves one are separate application steps.
The browser should request an allowed view; it should not select a public-access exception as a fallback for a failed private delivery.
Check the route outside the gallery
Use synthetic images in a staging exercise: one deliberately public flyer and one private color chart standing in for an attendee photo. No real attendees or event photos are needed.
For each private preset, verify that an authorized gallery request can display the image, then make a fresh direct request without its signed token and verify that delivery is denied. Test the thumbnail and detail view independently. For the public fixture, confirm the intended anonymous behavior.
Also check the application path that issues signed URLs: a user outside the event should not receive one merely by supplying the image identifier.
These are proposed acceptance checks, not tests already performed against From Strangers or a Cloudflare account.
Read delivery analytics against that contract
The new dashboard provides up to 30 days of delivery data and can break requests down by response status, traffic source, source image, and variant usage. Use it to investigate which gallery outputs are actually requested.
An access denial can be correct behavior. Treating every denied image request as a rendering bug creates pressure to make the dashboard greener by weakening the delivery rule.
Conversely, successful traffic does not establish that the requester belonged to the intended audience. Pair delivery observations with the saved variant policy and the applicationβs authorization checks.
The useful outcome is a gallery whose small and large views follow the same audience decision. Before optimizing which thumbnail loads fastest, make sure its delivery contract says who should receive it.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.