Apple Shortcut to upload photos to WordPress Media Library

UPDATE 11 Feb 2023:

Good news! I refactored this to work with the Share Sheet and to prompt you for credentials and a media endpoint on the initial setup.

Here is the new link:

Here is how easy it is to use on macOS.

And here is how easy it is to use on iOS:

Tonight I sat down and figured out something that has been in my head for months: Uploading photos to my WordPress Media Library with an Apple Shortcut. It works on both macOS and iOS.

I use the REST API to upload them to the /wp/v2/media endpoint via a POST request. For authentication I use a username and Application Password that I base64 encode.

Here is the basic workflow:

  • Select the photos
  • Loop through them and convert them to JPEGs. This is necessary because WordPress does not currently handle HEIC images, the default iOS image format.
  • Use a POST request to upload the converted JPEGs to the /wp/v2/media endpoint.

You currently have to run this from Share sheet support does not work on macOS Monterey, so I still have the step in there to pick images from I know they added this in Ventura, but I haven’t upgraded yet. Once I do, I’ll change this to only take images from the Share sheet so you can start in rather than Shortcuts. I know share sheet support works on iOS, but since I blog most on my Mac, I wanted to make a shortcut that works in both places.

If you’d like to use this Shortcut, you can get it here:

If you use it, you’ll need to make two changes:

  1. In the Text area at the top, put your WordPress Username and Application Password in this format: username:password
    • Application passwords are found under wp-admin -> Users -> your user profile -> Application passwords
  2. Change the domain from to your website’s domain.

13 responses to “Apple Shortcut to upload photos to WordPress Media Library”

  1. @cagrimmett the sluggishness and number of steps getting photos from my mobile device to my WP media library has really been a deterrent to photo blogging for me. I’d tinkered with trying to make the mobile app do it better but never got very far. This looks like the missing piece! Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: