This post demonstrates R2-hosted images (bucket dongli-blog-resources). Set params.imageCDN in hugo.toml to https://img.yourdomain.com, then reference objects with a relative path in Markdown.

See docs/r2-image-hosting.md and scripts/upload-image.ps1 in the repo.
hugo server -D