For developers: add Mosaicora share image tags to a website so social platforms can find the right image.
Follow the steps below to complete this workflow from start to finish.
A quick summary before you begin.
Open the website template or layout that controls social sharing tags.
Decide whether Mosaicora should add the tags automatically or whether you want to paste the tags yourself.
If Mosaicora should manage the tags, add the script and initialize it with your site ID.
If your site manages tags directly, paste the generated image tags into the page metadata.
Check the final page output and confirm the social image tags point to the Mosaicora image.
Script include
Load the browser helper before you initialize the share image flow.
<script src="https://static.mosaicora.io/js/og-image.min.js"></script>Initializer
Use this when you want Mosaicora to inject the final image tags automatically.
<script>
window.MosaicoraOgImage.init({
siteId: "ABC123",
});
</script>Manual OG tags
Paste this into your page head when you want to manage the metadata yourself.
<head>
<meta property="og:image" content="https://cdn.mosaicora.io/s/ABC123/product/products/view.jpg?page=2&sku=123" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:type" content="image/jpeg" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://cdn.mosaicora.io/s/ABC123/product/products/view.jpg?page=2&sku=123" />
</head>Generated head tags
This is the kind of output you should see once the helper is active.
<meta property="og:image" content="https://cdn.mosaicora.io/s/ABC123/product/products/view.jpg?page=2&sku=123" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:type" content="image/jpeg" />
<meta name="twitter:image" content="https://cdn.mosaicora.io/s/ABC123/product/products/view.jpg?page=2&sku=123" />