netlify-access-control
Picks the right Netlify protection layer for a deployed site and disambiguates the three unrelated things people call "auth". Use when a developer wants to…
Transform, resize, crop, reformat, and optimize images on demand via Netlify Image CDN's /.netlify/images endpoint. Use when adding responsive images, generating thumbnails, converting formats (avif/webp/png), cropping to aspect ratios, tuning image quality, creating blurred
$ npx -y skills add netlify/context-and-tools --skill netlify-image-cdn --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/netlify-image-cdnContext preview
The summary Claude sees to decide when to auto-load this skill.
Transform, resize, crop, reformat, and optimize images on demand via Netlify Image CDN's /.netlify/images endpoint. Use when adding responsive images, generating thumbnails, converting formats (avif/webp/png), cropping to aspect ratios, tuning image quality, creating blurred
name: netlify-image-cdn description: Transform, resize, crop, reformat, and optimize images on demand via Netlify Image CDN's /.netlify/images endpoint. Use when adding responsive images, generating thumbnails, converting formats (avif/webp/png), cropping to aspect ratios, tuning image quality, creating blurred placeholders, allowlisting remote image domains, serving user-uploaded images, or wiring framework image components (Next.js, Astro, Nuxt, Angular, Gatsby) to Netlify. Triggers on tasks like "optimize images", "add image thumbnails", "resize images on the fly", "serve images from an external domain", or "add blur placeholders".
Transform images by requesting `/.netlify/images` with query parameters. No function or file authoring required — it's a built-in edge endpoint.
# resize + crop to a 50px square, retain left side, convert to webp at q=80 curl -vs 'https://mysitename.netlify.app/.netlify/images?url=/owl.jpeg&fit=cover&w=50&h=50&position=left&fm=webp&q=80'
There is no legacy/deprecated form — the endpoint above is the only programmatic surface. Use framework image components where available (below) rather than hand-building URLs.
`GET /.netlify/images?url=<source>&...`
| Param | Values | Notes | |---|---|---| | `url` | relative path or full remote URL | **REQUIRED**. Only required param. | | `w` | integer px | width | | `h` | integer px | height | | `fit` | `contain` (default), `cover`, `fill` | resize behavior | | `position` | `center` (default), `top`, `bottom`, `left`, `right` | only applies when `fit=cover` | | `fm` | `avif`, `jpg`, `png`, `webp`, `gif`, `blurhash` | output format; `webp`/`gif` can be animated | | `q` | integer `1`–`100` (default `75`) | only for `avif`, `jpg`, `gif`, `webp` |
| `fit=` | aspect ratio kept | crops excess | returns exact dimensions | |---|---|---|---| | `contain` | yes | no | no — one dimension may be smaller | | `cover` | no | yes | yes — scaled proportionally, then cropped | | `fill` | no | no | yes — stretched/squished if needed |
Remote `url` values require allowlisting the domain in `netlify.toml`:
[images] remote_images = ["https://my-images.com/.*", "https://animals.more-images.com/[bcr]at/.*"]
Then percent-encode the remote URL and request it:
const src = `/.netlify/images?url=${encodeURIComponent("https://my-images.com/owl.jpeg")}`;Reuse the same params across many images via a redirect:
`_redirects`:
/transform-small/* /.netlify/images?url=/:splat&w=50&h=50 200
`netlify.toml`:
[[redirects]] from = "/transform-small/*" to = "/.netlify/images?url=/:splat&w=50&h=50" status = 200
Then `GET /transform-small/owl.jpeg` yields a 50×50 transform. **Avoid cross-site redirects for transformations** — they hurt performance.
`_headers`:
/source-images/* Cache-Control: public, max-age=604800, must-revalidate
Use the framework's native image component/handling; it wires to Image CDN automatically. Configure the remote allowlist per framework:
| Framework | Prerequisite | Remote allowlist | |---|---|---| | Angular | none — `NgOptimizedImage` auto-uses it | `[images] remote_images` in `netlify.toml` | | Astro | none — `<Image />` auto-uses it | `image.domains` / `image.remotePatterns` in `astro.config.mjs` | | Nuxt | none — `nuxt/image` auto-uses it | `image.domains` in `nuxt.config.ts` | | Next.js | Next 13.5+ and adapter v5 | `remotePatterns` in `next.config.js` | | Gatsby | env `NETLIFY_IMAGE_CDN=true` + Contentful/Drupal/WordPress source plugin | `[images] remote_images` in `netlify.toml` |
Run `netlify dev` (Netlify CLI) to test transformations locally — it mimics production including Image CDN.
Public Netlify skills for AI coding agents. Each skill is a focused, factual reference for a Netlify platform primitive — designed to help agents build correctly on Netlify without needing to search docs.
Repo: netlify/context-and-tools
Picks the right Netlify protection layer for a deployed site and disambiguates the three unrelated things people call "auth". Use when a developer wants to…
Run AI agent tasks remotely on Netlify using Claude, Codex, or Gemini. Use when the user wants to run an AI agent on their site, get a second opinion from…
Use OpenAI, Anthropic, Google Gemini, or OpenRouter models from Netlify Functions or Edge Functions without managing provider API keys or accounts — the…
Store and retrieve unstructured objects, file uploads, and cache-like state on Netlify using the @netlify/blobs key/value API from Functions, Edge Functions,…
Cache dynamic and static responses on Netlify's CDN from Functions, Edge Functions, and proxies. Use when you add caching or cache-control headers to a…
Configure Netlify projects via netlify.toml and the _headers/_redirects files — covering build settings and deploy contexts alongside environment…