The latest update to Cloudflare Images adds an Analytics dashboard that reports up to a month of delivery metrics for every stored image. Engineers responsible for AI model assets, web front‑ends, CI pipelines, or security monitoring can now see who is requesting images, from where, and how the service is responding.
What the Dashboard Shows
- Traffic trends and sources. Request volume is plotted over time and can be filtered by country, ASN, or referrer to isolate spikes.
- Delivery health. Requests are broken out by HTTP status code, allowing quick identification of error patterns. Filters for browser and OS reveal which client types receive which output formats.
- Asset and variant usage. The most‑requested source images and their variants are listed, making it easy to spot over‑used or under‑used configurations.
Accessing the Data via CLI and SQL API
The same data is available through the Cloudflare CLI (cf sql query) and the SQL API. Two example queries illustrate the basic patterns.
cf sql query \ 'SELECT httpStatus, COUNT(*) AS requests FROM events.imagesHostedRequests GROUP BY httpStatus ORDER BY requests DESC LIMIT 20' \ --scope-account "<ACCOUNT_TAG>" \ --time-since "<START_TIME>"
This query returns a count of requests per HTTP status code for the selected time window.
cf sql query \ 'SELECT isBindingRequest, scriptName, originHost, COUNT(*) AS transformations FROM events.imagesTransformations GROUP BY isBindingRequest, scriptName, originHost ORDER BY transformations DESC LIMIT 5' \ --scope-account "<ACCOUNT_TAG>" \ --time-since "<START_TIME>"
The second query surfaces transformation activity, including binding requests and the scripts that performed them.
Operational and Security Considerations
- Monitoring spikes in request volume or unusual status codes can surface misconfigurations, abusive traffic, or downstream service failures before they impact users.
- Variant usage data helps teams prune unused image sizes, reducing storage costs and attack surface.
- Because the analytics are scoped to an account, access control for the CLI and API should be aligned with existing Cloudflare IAM policies to prevent unauthorized data extraction.
- Transformation logs (events.imagesTransformations) reveal which edge scripts are invoked, offering a point of inspection for any custom logic that could be exploited.
Related CloudNinjas coverage: hands-on guides.
What This Means For Practitioners
Start by adding the Images Analytics dashboard to your regular observability routine. Set up alerts on unexpected traffic surges or error‑rate thresholds using the CLI‑based SQL queries. Review variant request patterns quarterly to eliminate waste and to confirm that only intended formats are exposed. Finally, verify that the accounts and tokens used for cf sql have the minimum required permissions, keeping analytics data within the same trust boundary as your image assets.
