Instant social images, one line of HTML. Hosted version of puppeteer-social-image.
<meta property="og:image" content="https://ogi.sh?title=Hello%20World" />
Gallery | Template Editor | Pricing
Create a meta tag, and add it to the <head />
of each page:
<meta property="og:image" content="https://ogi.sh?title=Hello%20World" />
When the page is shared, Facebook will show the image at https://ogi.sh?title=Hello%20World. For Twitter, see our recommended meta tags.
Try changing the background via the unsplashId
param:
<meta
property="og:image"
content="https://ogi.sh?title=Hello%20World&unsplashId=phIFdC6lA4E"
/>
Add your logo via the logo
param:
<meta
property="og:image"
content="https://ogi.sh?title=Hello%20World&unsplashId=phIFdC6lA4E&logo=https%3A%2F%2Fi.imgur.com%2FyKp8kEI.png"
/>
This is using the default template, basic
. You can see the full documentation for basic
below. Want to remove the watermark? See the instructions below.
Let's try another template called article
by pointing to /article
. The query params are broken onto new lines so you can see what's going on.
<meta
property="og:image"
content="https://ogi.sh/article?
eyebrow=27%20AUGUST&
title=INTO%20THE%20OCEAN&
subtitle=Explore%20the%20depths%20of%20the%20deep%20blue%20sea&
unsplashId=gGX1fJkmw3k"
/>
Neat, huh? Check out the template gallery to explore our beautiful, free templates covering various use cases.
This is a pro feature.
Creating your own, branded template can be done via the Editor. It's as simple as HTML and CSS, with handlebars for templating. We also provide an API to publish custom templates if that's more your thing.
IMPORTANT: Your template will be public, so it's important to watermark the template with your brand or URL.
Using your template:
<meta
property="og:image"
content="https://ogi.sh/infGC5AQ&title=MIND%20BLOWN"
/>
Renders text on a background image.
title
string - text to renderlogo
string - URL for the logounsplashId
string - Unsplash image ID for the backgroundunsplashKeywords
string - keywords (comma-separated) for a random image from Unsplash for the backgroundimageUrl
string - URL for the background imagegoogleFont
string - Google Font to render
<meta
property="og:image"
content="https://ogi.sh?title=Hello%20World&unsplashId=WLUHO9A_xik"
/>
Display a title and subtitle on a background image, with an optional eyebrow
title
string - title textsubtitle
string - subtitle texteyebrow
string - eyebrow text that renders above the title. Use for datelogo
string - URL for the logounsplashId
string - Unsplash image ID for the backgroundunsplashKeywords
string - keywords (comma-separated) for a random image from Unsplash for the backgroundimageUrl
string - URL for the background imagegoogleFont
string - Google Font to render
<meta
property="og:image"
content="https://ogi.sh/article?
eyebrow=27%20AUGUST&
title=INTO%20THE%20OCEAN&
subtitle=Explore%20the%20depths%20of%20the%20deep%20blue%20sea&
unsplashId=gGX1fJkmw3k"
/>
Multi-use template for an array of use cases
title
string - title textsubtitle
string - subtitle textlogo
string - URL for the logounsplashId
string - Unsplash image ID for the backgroundunsplashKeywords
string - keywords (comma-separated) for a random image from Unsplash for the backgroundimageUrl
string - URL for the background imagegoogleFont
string - Google Font to render
<meta
property="og:image"
content="https://ogi.sh/fiftyfifty?title=INTO%20THE%20MOUNTAINS"
/>
Here's a full list of the social tags we recommend using on your webpage. These will be picked up by social platforms whenever your webpage is shared in order to enhance the preview.
Place these inside the <head>
of your webpage, and make sure they're rendered server-side.
Used by Facebook and many other platforms.
<meta property="og:image" content="https://ogi.sh?title=Hello%20World" />
<meta property="og:site_name" content="EuroTravel" />
<meta property="og:type" content="website" />
<meta property="og:title" content="European Travel Destinations" />
<meta property="og:description" content="Offering tour packages for groups." />
Used by Twitter.
<meta name="twitter:image" content="https://ogi.sh?title=Hello%20World" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="European Travel Destinations" />
<meta name="twitter:description" content="Offering tour packages for groups." />
Note that Twitter uses
name
instead ofproperty
.
See this article for a much more in-depth explanation of meta tags.
Call the API directly and specify the size
parameter with value as one of:
ig-landscape
ig-portrait
ig-square
ig-story
https://ogi.sh/preview?title=Hello%20World&size=ig-square
Call the API directly and specify the size
parameter with value pinterest
.
https://ogi.sh/preview?title=Hello%20World&size=pinterest
MIT © Chris Villa