Migrating CDN to Cloudflare R2 0 ▲ Abstract Nonsense 111 days ago · Tech · hide · Fediverse post I’ve migrated my static images to use Cloudflare R2 as my object store and image CDN. R2 exposes an S3-compatible API, which makes it nice and easy to use the aws CLI to interact with the bucket. Previously I was (ab)using GitHub’s free image CDN via their user media upload support in Issues (https://github.com/user-attachments/assets/<hash>). However, this is slow and not very idiomatic. For R2, I’ve attached the bucket to my public sub-domain, so raster images are now served from cdn.abstractnonsense.xyz and should load much faster. I’ve also migrated my inline-footnote Hugo Markdown render hook from overriding image-links to overriding regular-links. Now, relative image paths are prepended with the CDN. The publishing workflow still involves manually uploading images to the desired path and ensuring the Hugo path reflects it, but I might make this more ergonomic in the future. I’m thinking about building a folder-add triggered Shortcut on my macOS that’ll take care of the bucket… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town