Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/netlify/context-and-toolsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/netlify/context-and-tools/netlify-image-cdn)<a href="https://agentmods.dev/rules/netlify/context-and-tools/netlify-image-cdn"><img src="https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-image-cdn/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/netlify/context-and-tools/netlify-image-cdn"><img src="https://agentmods.dev/badge/rules/netlify/context-and-tools/netlify-image-cdn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00115 | $0.02709 |
| Opus 5.5 | $0.00046 | $0.01084 |
| Sonnet 5.5 | $0.00023 | $0.00542 |
| Haiku 4.5 | $0.00012 | $0.00271 |
Grade C, and why
netlify-image-cdn scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- system: agent-context/image-cdn/system.md — human-owned, merged by ctx-gen; edit system.md, not this section --> Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -vs "$S/.netlify/images?url=/owl.jpeg" # format negotiation only How it starts
The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Netlify Image CDN
Use this / avoid this
// USE: build the URL on the site's own domain; url is required, the rest optional
const src = `/.netlify/images?url=${encodeURIComponent(remoteOrPath)}&w=400&h=300&fit=cover&fm=webp&q=75`;
# USE: single-quoted literal regex in netlify.toml
[images]
remote_images = ['https://my-images\.com/.*']
Avoid:
_headers/[[headers]]rules targeting a path that rewrites to/.netlify/images(including/_next/image). They are silently ignored. Use an edge function instead.headers()innext.config.jsfornext/image. It is ignored for the same reason.fit=coverwith onlywor onlyh. Cover requires both.- Hand-rolling
/.netlify/imagesURLs in Angular, Astro, Gatsby, Next.js, or Nuxt. Use the framework's image component, which already uses Image CDN (see Frameworks).
Endpoint
/.netlify/images?url=<source>[&w=<int>][&h=<int>][&fit=contain|cover|fill][&position=top|bottom|left|right|center][&fm=avif|jpg|png|webp|gif|blurhash][&q=1-100]
| Param | Values | Default | Notes |
|---|---|---|---|
url |
relative (/owl.jpeg) or absolute remote URL |
required | Remote URLs must match remote_images |
w, h |
integer px | — | Applied according to fit |
fit |
contain / cover / fill |
contain |
Same semantics as CSS object-fit |
position |
top / bottom / left / right / center |
center |
The part of the image retained when fit=cover |
fm |
avif jpg png webp gif blurhash |
negotiated | webp and gif may be animated |
q |
integer 1–100 | 75 |
Lossy quality for avif, jpg, gif, webp |
Format negotiation when fm is omitted (from the Accept header): webp if accepted, else avif, else the original format. A url-only request keeps the image's dimensions but still converts the format.
Response codes:
200: new transformation, with the correctcontent-type(for exampleimage/pngforfm=png).304: previously transformed image.404: any invalid parameter value. Check the parameters before suspecting the source.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago Changed · +16 lines · -3 tokens per session 94397d8c721c
- 2mo ago Changed · +20 lines · -9 tokens per session c26b0879f86b
- 3mo ago First seen · 161 lines · 127 tokens per session scan C 942cd5d77d18
netlify-image-cdn is a cursor rule published in the GitHub repository netlify/context-and-tools (58 stars, last pushed 4d ago), licensed MIT. It adds 115 tokens to every session and 2,709 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it C with 2 findings (hidden instructions, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
netlify-image-cdn compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| netlify-image-cdnnetlify/context-and-tools | Cursor rule | 58 | 4d ago | MIT | C | 115 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 202k | 9d ago | MIT | A | 604 | Cursor |
| angular-20angular/angular | Cursor rule | 102k | today | MIT | A | 0 | Cursor |
| dev-standardapache/superset | Cursor rule | 76k | today | Apache-2.0 | A | 1,147 | Cursor |
| prefer-assertions-over-defensive-checksprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| prefer-direct-imports-over-module-mocksprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| shared-plane-packagesprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |