package main import ( "bytes" "context" ) // CoffeeImageBlock renders an image with the torn-edge frame and optional // handwritten caption. // Content shape: {"src": "...", "alt": "...", "caption": "..."} func CoffeeImageBlock(ctx context.Context, content map[string]any) string { src := getString(content, "src") alt := getString(content, "alt") caption := getString(content, "caption") var buf bytes.Buffer _ = coffeeImageComponent(src, alt, caption).Render(ctx, &buf) return buf.String() }