
Serving Blog Images from R2: A Remote Image Example
- John Doe
- Technology
- 05 Apr, 2022
- 01 Min read
This demo post proves that a blog post can use images hosted outside the repository. The hero image above is loaded from an absolute R2 URL instead of a file under public/images/, and the social share image is a different absolute URL.
Why remote images
Hosting images on R2 keeps the repository small and lets the CDN serve media directly. A post only needs the full URL in its frontmatter — no local copy is required.
What to check
Open this post after a build and confirm the hero image renders, the page metadata uses the separate og_image for sharing, and the table of contents above lists both headings on this page.
