Ecommerce
Add automatic Open Graph images to Shopify product, collection, blog, and page URLs with a Liquid theme snippet.
Shopify themes normally render Open Graph tags from a shared Liquid snippet such as social-meta-tags.liquid or meta-tags.liquid.
The best MyOG setup is a Liquid snippet that uses Shopify's canonical_url value, so product, collection, article, blog, and page URLs all resolve to the shared page URL crawlers will fetch.
A Shopify app is possible later through theme app extensions, but a guide is still valuable because themes often already emit og:image and duplicate tags need manual handling.
MyOG detects page content and branding automatically. The layout only controls image composition.
Use this inside your social meta tag snippet or directly above </head> in theme.liquid.
{%- assign myog_page_url = canonical_url | url_encode -%}
<meta property="og:image" content="https://api.myog.social/og?url={{ myog_page_url }}&template=screenshot-right" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://api.myog.social/og?url={{ myog_page_url }}&template=screenshot-right" />If your theme already emits twitter:image from the same image source, replace that block too.
Shopify themes often output og:image from product.featured_image, article.image, or settings.share_image. If you add MyOG without removing the old block, social crawlers may keep using the first og:image they see. Replace the existing og:image block for a full rollout, or wrap MyOG in a condition only for pages that lack a native image.
Use canonical_url in Liquid. It gives the current canonical URL across product, collection, page, article, and blog templates, which is exactly what MyOG needs in its url parameter.
Start with the MyOG Open Graph Checker, then refresh social platform caches if needed.
Sign up for free and give every Shopify product and article a generated social image.
Already have an account?
cdf733b534ea2f2ed964d150330b323c44837e4f