Custom OG Images for Your Squarespace Site

Squarespace uses your featured image as the OG image. With Imago API, get branded text-based cards that actually stand out on social.

Start Generating Free

Code Injection

Add via Settings > Advanced > Code Injection > Header.

Auto Detects

Reads h1 or page title automatically for dynamic previews.

No Backend

Pure client-side solution — no server changes needed.

Easy Integration

Add this snippet to your Squarespace Code Injection:

<!-- Squarespace: Settings > Advanced > Code Injection > Header -->
<script>
  document.addEventListener('DOMContentLoaded', function () {
    var h1 = document.querySelector('h1.entry-title, h1.blog-title, h1');
    var title = (h1 && h1.textContent.trim()) || document.title;
    var ogUrl = 'https://imagoapi.com/api/og/generate?title='
      + encodeURIComponent(title)
      + '&template=modern&api_key=YOUR_IMAGO_KEY';
    var existing = document.querySelector('meta[property="og:image"]');
    if (existing) {
      existing.setAttribute('content', ogUrl);
    } else {
      var meta = document.createElement('meta');
      meta.setAttribute('property', 'og:image');
      meta.setAttribute('content', ogUrl);
      document.head.appendChild(meta);
    }
  });
</script>

Ready to Upgrade Your Social Sharing?

Join thousands of Squarespace sites using Imago API for stunning OG images.

Start Free Trial