Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Manage images and videos with Cloudinary. Use when a user asks to optimize images, add image transformations, implement responsive images, upload media, or serve optimized assets from a CDN.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -29% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -12% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-12 | ✓→✓ | = Same ✓ | 3% | 0% |
| case-04 | ✓→✓ | = Same ✓ | -38% | 0% |
Cloudinary is a media management platform — upload, transform, optimize, and deliver images/videos via CDN. On-the-fly transformations (resize, crop, format conversion, AI-based cropping) via URL parameters.
typescript// lib/cloudinary.ts — Upload and transform import { v2 as cloudinary } from 'cloudinary' cloudinary.config({ cloud_name: process.env.CLOUDINARY_CLOUD_NAME, api_key: process.env.CLOUDINARY_API_KEY, api_secret: process.env.CLOUDINARY_API_SECRET, }) // Upload image const result = await cloudinary.uploader.upload(filePath, { folder: 'products', transformation: [ { width: 1200, height: 1200, crop: 'limit' }, // max dimensions { quality: 'auto', fetch_format: 'auto' }, // auto-optimize ], }) // result.secure_url → https://res.cloudinary.com/myapp/image/upload/v1234/products/abc.jpg
typescript// Generate optimized URLs without re-uploading function getImageUrl(publicId: string, options: { width: number; height: number }) { return cloudinary.url(publicId, { width: options.width, height: options.height, crop: 'fill', gravity: 'auto', // AI-based smart crop quality: 'auto', // auto quality fetch_format: 'auto', // WebP/AVIF based on browser dpr: 'auto', // device pixel ratio }) } // Responsive srcset function getSrcSet(publicId: string) { return [320, 640, 960, 1280, 1920] .map(w => `${getImageUrl(publicId, { width: w, height: Math.round(w * 0.75) })} ${w}w`) .join(', ') }
tsx// next.config.js module.exports = { images: { loader: 'cloudinary', path: 'https://res.cloudinary.com/myapp/image/upload/', }, } // Or use next-cloudinary import { CldImage } from 'next-cloudinary' <CldImage src="products/sneakers" width={800} height={600} crop="fill" gravity="auto" alt="Product image" sizes="(max-width: 768px) 100vw, 50vw" />
quality: 'auto' and fetch_format: 'auto' — Cloudinary picks the best format/quality.gravity: 'auto' uses AI to detect the subject and crop intelligently.Other measured skills in the registry, with their headline benchmark lift.