Import images from feed?

A batch copy like that is definitely scriptable. At a high level, it would be something like:

  1. Parse the post for image tags.
  2. Download the image.
  3. Upload the image to Micro.blog using the Micropub API media endpoint.
  4. Get the new URL from the Micropub call you just made.
  5. Edit the HTML to use the new URL, then save it back via the Micropub API.

This help page has some basics about using the API.

Also I wrote a script (Ruby) a while back that uploaded a bunch of MP3s to Micro.blog, which is basically the same as uploading images.

1 Like