How to Upload Cloudflare Images with Mac Automator


Cloudflare Images fckin rocks. It's cheap, fast, stores a ton of images, creates many resized images for free, and doesn't take up data space on apps.


Uploading to CF images requires going to CF Images homepage then you need to find the file, upload it, copy the URL and then put it in Markdown format for Obsidian. Yikes!

If you're on Mac, we can automate this process using Automator.

Let's upload this picture of Alexander the Great (top right corner).

Set Workflow Recieves

Add a Run Shell Script

Add a Run Shell Script and drag it over to the main window:

Call the Cloudflare Images API

This code is uploading the files to cloudflare images. $@ is the file highlighted. file=@$f is the file path. An API key can be created here -- generated by Stenography

Parse the Result with Javascript

Add a Run Javascript workflow.

Copy in the following JS script:

This code is a simple script that takes the input from the user and parses it to extract the filename, uploaded date and variants. It then creates an image tag with these values as attributes. -- generated by Stenography

Copy Resulting String to Clipboard


I named my action Upload CF Image. You can find it under whatever you named it as under the Quick Action list:

And there it is!

Discuss this post on Reddit

Read These Next

The Necromancy of Justification

Why its good to let old ideas die - Science Moves Forward One Funeral At a Time

Search Obsidian with an iOS Shortcut

Search Obsidian without opening the app? Yes please!

Stay in Touch

Each week, I send out something that looks like this. Sign up below if you want in!