When a social platform requests your page’s og:image, OpenGraph+ loads your page in a headless browser and captures it as an image.
The render process
- Social platform (LinkedIn, Twitter, etc.) requests your page
- Your server returns HTML with
og:imagepointing to OpenGraph+ - Platform fetches the image URL
- OpenGraph+ loads your page in a headless browser
- OpenGraph+ injects
data-ogpluson<html> - Your CSS responds to the attribute (hiding nav, showing social content, etc.)
- OpenGraph+ captures the viewport as an image
- Image is returned to the social platform
The data attribute
When rendering, OpenGraph+ adds data-ogplus to your <html> element:
<!-- Generic render -->
<html data-ogplus>
<!-- Consumer-specific render -->
<html data-ogplus="linkedin">
<html data-ogplus="twitter">
This attribute is your hook for styling. Any CSS that targets [data-ogplus] only applies during social card rendering—not to regular visitors.
Viewport
The renderer captures a fixed-width viewport. Mobile widths (600-800px) tend to work best for social cards since they force a simpler, more focused layout.
Configure the viewport width in your framework’s OpenGraph+ settings. See your framework’s documentation for specifics.