Prompt
I'm trying to resize images automatically on upload, what API should I use?
Latest observation
If you want images resized automatically on upload, the best API depends on where your images are stored and how much control you want.
Common options
1. Cloudinary
Best if you want a full image pipeline: upload, resize, crop, optimize, format conversion, CDN delivery.
- Upload image
- Request transformations like resize/crop via URL or API
- Can auto-optimize formats like WebP/AVIF
Good for: easiest all-in-one solution
2. ImageKit
Very similar to Cloudinary, with strong real-time transformations and optimization.
Good for: fast image delivery + transformations
3. AWS S3 + Lambda
If you already use AWS, you can:
- upload original image to S3
- trigger a Lambda function on upload
- resize using Sharp/ImageMagick
- save resized versions back to S3
Good for: custom backend control
4. Firebase Storage + Cloud Functions
Similar idea to AWS:
- upload image to Firebase Storage
- trigger a Cloud Function
- resize and store variants
Good for: Firebase-based apps
5. Self-hosted backend with Sharp
If you have your own server/API:
- receive upload
- resize using
sharpin Node.js - save processed image
Good for: full control, lower vendor dependency
If you want the simplest answer:
Use Cloudinary or ImageKit.
They already handle:
- upload
- resizing
- compression
- delivery
- responsive sizes
So you usually don’t need to build resizing yourself.
If you want, I can also recommend the best option based on your stack (Node.js, Python, AWS, Firebase, etc.) and show a code example.