Store, transform, and deliver images at scale with Cloudflare Images API and URL-based transformations.
Works with
Upload images via API, direct creator URLs, or external sources; serve via imagedelivery.net with optional signed URLs for private access
Transform any image on-the-fly using /cdn-cgi/image/ parameters (resize, crop, quality, format auto-detection) or Workers cf.image object
Create up to 100 named variants for common transformations; use flexible variants for dynamic parameters (in
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versioncloudflare-imagesExecute the skills CLI command in your project's root directory to begin installation:
Fetches cloudflare-images from jezweb/claude-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate cloudflare-images. Access via /cloudflare-images in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
1
total installs
1
this week
697
GitHub stars
0
upvotes
Run in your terminal
1
installs
1
this week
697
stars
Status: Production Ready ✅ Last Updated: 2026-01-21 Dependencies: Cloudflare account with Images enabled Latest Versions: Cloudflare Images API v2, @cloudflare/[email protected]
Recent Updates (2025):
gravity=face with zoom control, GPU-based RetinaFace, 99.4% precision)Deprecation Notice: Mirage deprecated September 15, 2025. Migrate to Cloudflare Images for storage/transformations or use native <img loading="lazy"> for lazy loading.
Two features: Images API (upload/store with variants) and Image Transformations (resize any image via URL or Workers).
1. Enable: Dashboard → Images → Get Account ID + API token (Cloudflare Images: Edit permission)
2. Upload:
curl -X POST https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/images/v1 \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@./image.jpg'
3. Serve: https://imagedelivery.net/<ACCOUNT_HASH>/<IMAGE_ID>/public
4. Transform (optional): Dashboard → Images → Transformations → Enable for zone
<img src="/cdn-cgi/image/width=800,quality=85/uploads/photo.jpg" />
1. File Upload: POST to /images/v1 with file (multipart/form-data), optional id, requireSignedURLs, metadata
2. Upload via URL: POST with url=https://example.com/image.jpg (supports HTTP basic auth)
3. Direct Creator Upload (one-time URLs, no API key exposure):
Backend: POST to /images/v2/direct_upload → returns uploadURL
Frontend: POST file to uploadURL with FormData
CRITICAL CORS FIX:
multipart/form-data (let browser set header)file (NOT image)/direct_upload from backend onlyContent-Type: application/json/direct_upload from browserURL: /cdn-cgi/image/<OPTIONS>/<SOURCE>
width=800,height=600,fit=coverquality=85 (1-100)format=auto (WebP/AVIF auto-detection)gravity=auto (smart crop), gravity=face (AI face detection, Aug 2025 GA), gravity=center, zoom=0.5 (0-1 range, face crop tightness)blur=10,sharpen=3,brightness=1.2scale-down, contain, cover, crop, padWorkers: Use cf.image object in fetch
fetch(imageURL, {
cf: {
image: { width: 800, quality: 85, format: 'auto', gravity: 'face', zoom: 0.8 }
}
});
Named Variants (up to 100): Predefined transformations (e.g., avatar, thumbnail)
/images/v1/variants with id, optionsimagedelivery.net/<HASH>/<ID>/avatarFlexible Variants: Dynamic params in URL (w=400,sharpen=3)
/images/v1/config with {"flexible_variants": true}Generate HMAC-SHA256 tokens for private images (URL format: ?exp=<TIMESTAMP>&sig=<HMAC>).
Algorithm: HMAC-SHA256(signingKey, imageId + variant + expiry) → hex signature
See: templates/signed-urls-generation.ts for Workers implementation
✅ Use multipart/form-data for Direct Creator Upload
✅ Name the file field file (not image or other names)
✅ Call /direct_upload API from backend only (NOT browser)
✅ Use HTTPS URLs for transformations (HTTP not supported)
✅ URL-encode special characters in image paths
✅ Enable transformations on zone before using /cdn-cgi/image/
✅ Use named variants for private images (signed URLs)
✅ Check Cf-Resized header for transformation errors
✅ Set format=auto for automatic WebP/AVIF conversion
✅ Use fit=scale-down to prevent unwanted enlargement
❌ Use application/json Content-Type for file uploads
❌ Call /direct_upload from browser (CORS will fail)
❌ Use flexible variants with requireSignedURLs=true
❌ Resize SVG files (they're inherently scalable)
❌ Use HTTP URLs for transformations (HTTPS only)
❌ Put spaces or unescaped Unicode in URLs
❌ Transform the same image multiple times in Workers (causes 9403 loop)
❌ Exceed 100 megapixels image size
❌ Use /cdn-cgi/image/ endpoint in Workers (use cf.image instead)
❌ Forget to enable transformations on zone before use
This skill prevents 16 documented issues.
Error: Access to XMLHttpRequest blocked by CORS policy: Request header field content-type is not allowed
Source: Cloudflare Community #345739, #368114
Why It Happens: Server CORS settings only allow multipart/form-data for Content-Type header
Prevention:
// ✅ CORRECT
const formData = new FormData();
formData.append('file', fileInput.files[0]);
await fetch(uploadURL, {
method: 'POST',
body: formData // Browser sets multipart/form-data automatically
});
// ❌ WRONG
await fetch(uploadURL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' }, // CORS error
body: JSON.stringify({ file: base64Image })
});
Error: Error 5408 after ~15 seconds of upload
Source: Cloudflare Community #571336
Why It Happens: Cloudflare has 30-second request timeout; slow uploads or large files exceed limit
Prevention:
const MAX_FILE_SIZE = 10 * 1024 * 1024; // 10MB
if (file.size > MAX_FILE_SIZE) {
alert('File too large. Please select an image under 10MB.');
return;
}
Error: 400 Bad Request with unhelpful error message
Source: Cloudflare Community #487629
Why It Happens: File field must be named file (not image, photo, etc.)
Prevention:
// ✅ CORRECT
formData.append('file', imageFile);
// ❌ WRONG
formData.append('image', imageFile); // 400 error
formData.append('photo', imageFile); // 400 error
Error: Preflight OPTIONS request blocked
Source: Cloudflare Community #306805
Why It Happens: Calling /direct_upload API directly from browser (should be backend-only)
Prevention:
ARCHITECTURE:
Browser → Backend API → POST /direct_upload → Returns uploadURL → Browser uploads to uploadURL
Never expose API token to browser. Generate upload URL on backend, return to frontend.
Error: Cf-Resized: err=9401 - Required cf.image options missing or invalid
Source: Cloudflare Images Docs - Troubleshooting
Why It Happens: Missing required transformation parameters or invalid values
Prevention:
// ✅ CORRECT
fetch(imageURL, {
cf: {
image: {
width: 800,
quality: 85,
format: 'auto'
}
}
});
// ❌ WRONG
fetch(imageURL, {
cf: {
image: {
width: 'large', // Must be number
quality: 150 // Max 100
}
}
});
Error: Cf-Resized: err=9402 - Image too large or connection interrupted
Source: Cloudflare Images Docs - Troubleshooting
Why It Happens: Image exceeds maximum area (100 megapixels) or download fails
Prevention:
Error: Cf-Resized: err=9403 - Worker fetching its own URL or already-resized image
Source: Cloudflare Images Docs - Troubleshooting
Why It Happens: Transformation applied to already-transformed image, or Worker fetches itself
Prevention:
// ✅ CORRECT
if (url.pathname.startsWith('/images/')) {
const originalPath = url.pathname.replace('/images/', '');
const originURL = `https://storage.example.com/${originalPath}`;
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
jezweb/claude-skills
jezweb/claude-skills
jezweb/claude-skills
jezweb/claude-skills
jezweb/claude-skills
jezweb/claude-skills
I recommend cloudflare-images for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
We added cloudflare-images from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
cloudflare-images reduced setup friction for our internal harness; good balance of opinion and flexibility.
Keeps context tight: cloudflare-images is the kind of skill you can hand to a new teammate without a long onboarding doc.
cloudflare-images is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
cloudflare-images fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
cloudflare-images fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
cloudflare-images reduced setup friction for our internal harness; good balance of opinion and flexibility.
I recommend cloudflare-images for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
cloudflare-images has been reliable in day-to-day use. Documentation quality is above average for community skills.
showing 1-10 of 60