Add runtime OpenGraph image generation
GitHub issue · Closed
Summary
- Add runtime OpenGraph image data, metadata helpers, and hashed image routes for every current user-facing HTML page.
- Render OG images lazily with Carta and BrowseChrome, streaming cached objects from storage and generating/storing JPEGs on misses.
- Add object storage streaming support, runtime Chromium dependencies, and tests covering metadata, storage behavior, controller routing, and HTML escaping.
- Document that new user-facing pages should include OpenGraph images through the shared helpers.
Testing
mix precommit
MIX_ENV=test mix run -e 'image = HiveWeb.OpenGraph.generate(HiveWeb.OpenGraph.login_page()); IO.inspect({byte_size(image), binary_part(image, 0, 3)})'
curl -s -o /tmp/hive-og-login.jpg -w '%{http_code} %{content_type} %{size_download}' 'http://localhost:4605/open-graph/login/o4U4WIXFn-8CVjz5mXgEbfjsZycs7I-ZJDrptxerdtU'
file /tmp/hive-og-login.jpg