Networking

imgproxy - On-the-fly image resizing with caching in front

networkingself-hostedproxymediaimages

Storing five sizes of every uploaded photo is a fine idea until a sixth size is needed. imgproxy resizes, crops, and converts images on request, with URLs that describe the transformation and a signature to stop anyone asking for arbitrary work. It’s stateless, so you can run more than one instance behind a load balancer. A cache in front keeps repeated requests cheap, which is where most of the savings come from. It won’t replace a digital asset manager or decide which crop looks best. For serving images at the shape a layout needs, it’s a clean piece of plumbing.

Links

Alternatives

  • Thumbor: An older image service with a plugin ecosystem, more moving parts than imgproxy.
  • sharp: A Node library for image work in-process, quick when it lives inside your app.
  • Cloudinary: A hosted image CDN with many transformations, closed source and paid beyond a free tier.