Image auto-imports and Mastodon Boost links

While fine-tuning the iNaturalist import, I started auto-importing images to the blog from the image in the feed, using media_sideload_image(). Since Pixelfed has started including an embedded image in its feed, I did the same there.

And I finally bit the bullet and wrote a simple feed proxy to read my Mastodon Atom feeds and rearrange the elements that IFTTT doesn’t know to look for: images attached as enclosures, and the post URL for boosted posts. (It was picking up the author’s URL because they’re both link rel=”alternate” and instead of actually looking at the feed structure – like the fact that the author’s link was inside an <author> entity – it was just pulling the first one it found.)

So in theory, I should be able to let this run and it will automatically import not only my Instagram photos, but Pixelfed, Mastodon, and iNaturalist as well. Twitter’s a bit more complex because it doesn’t link directly to the photo URL, so I’ll have to retrieve the link and parse the HTML to find it. And multi-photo posts are still an issue on both Pixelfed (because the feed only includes the first image) and Instagram (because the importer doesn’t handle it quite right). But that’s still a big improvement for my usual use case, and a lot less manual adjusting I need to do!