How to Upload Cloudflare Images with Mac Automator

Intro

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.

ALL IMAGES IN THIS POST WERE UPLOADED USING AUTOMATOR

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

Conclusion

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!

Read These Next

I Became A Firebender Using Machine Learning

25% of the way to becoming the Avatar

A List of Good Matts

While surely there are bad Matts out there (and ive met a few!!), these are not them.

Turn YouTube videos into searchable text

Voila, now you can search through timestamped YouTube videos