Cloudinary

From IndieWeb


Cloudinary is a hosting and management service for images and video which can be used as an image proxy.

IndieWeb Examples

Marty McGuire

Marty McGuire uses Cloudinary as a resizing and cropping image proxy for media that he uploads to his site. The process works in three parts:

  • a micropub media endpoint running at media.martymcgui.re accepts uploads and then serves the uploaded file back as-is.
  • a static site powered by Hugo recognizes URLs for files at media.martymcgui.re and re-writes them into proxied URLs through Cloudinary.
  • Cloudinary fetches the original file from media.martymcgui.re, performs any resizing and other transforms such as face-finding and cropping, and caches the result.

Example flow:

  1. Marty creates a photo post with Indigenous.
    • In the background, Indigenous has micropub media endpoint support. It uploads the photo to media.martymcgui.re and gets back the URL to the new image: https://media.martymcgui.re/10/2b/b7/d9/d1ec6f8345dc908e0098eb033f931de82b3cea1456f81fb6a7a056b3.jpg
    • That URL is in the photo property for the new post.
  2. Marty's site rewrites the photo URL so that the request will be proxied through Cloudinary.
    • https://res.cloudinary.com/schmarty/image/fetch/w_960,c_fill/https://media.martymcgui.re/10/2b/b7/d9/d1ec6f8345dc908e0098eb033f931de82b3cea1456f81fb6a7a056b3.jpg
  3. When a browser visits the resulting post it requests the image from Cloudinary, which will fetch it from media.martymcgui.re, transform, and cache it for future requests.