AddThisFeature

Share Image Generator

Give every shared link a proper preview image instead of a blank card.

moderate Social & Sharing

What it adds

Server-side generation of a per-page preview image, referenced by the page's existing share metadata.

What your agent is told to do

5
  1. 1

    Find where the app already sets its share metadata, most likely alongside Social Sharing or Shareable Deep Links, and point the image tag at the generated URL rather than adding a parallel metadata block.

  2. 2

    Generate the image on the server from the record's own title, author, and a brand mark. Do not render it in the visitor's browser; the services that fetch previews do not run scripts.

  3. 3

    Design one template that degrades well, then add variants only where the content type genuinely differs. Three good templates beat a configurable layout engine nobody tunes.

  4. 4

    Store generated images with the record and regenerate on save, so the first person to share a page is not the one who waits for the render.

  5. 5

    Do not generate a preview for anything the requester could not otherwise read. The image is public by definition and leaks the title of a private draft to anyone who guesses the URL.

Edge cases it handles

8
  • Cache each generated image and invalidate it when the underlying title, author, or cover changes. A stale preview outlives the edit by weeks because the platforms that fetched it cache aggressively too.
  • Long titles and non-Latin scripts must wrap and shrink to fit rather than clip. Test with a title that is one very long word and with a script that needs a different font.
  • Load fonts from a fixed, bundled set so two renders of the same record produce the same image. A font that resolves differently between runs makes output silently inconsistent.
  • When generation exceeds its time budget or errors, serve a static branded fallback image with the correct dimensions rather than returning nothing and producing a blank card.
  • Private, unpublished, and deleted pages must not generate previews at all, and any image already generated for them must stop being served.
  • The endpoint is fetched by anonymous crawlers, so it needs rate limiting and a size cap or it becomes an easy way to burn server time.
  • Emit correct width, height, and alt text in the metadata so the card reserves its space and describes itself.
  • User-supplied text rendered into the image needs the same moderation treatment as the page itself; an abusive title otherwise ships as an image into other people's feeds.

Definition of done

9
  • Every publicly shareable page returns a generated preview image at the standard dimensions.
  • Images regenerate when the source content changes and stale versions stop being served.
  • Long titles and non-Latin scripts render fully without clipping.
  • Repeated renders of the same record produce identical output.
  • A generation timeout falls back to a static branded image rather than an empty response.
  • Private and unpublished records produce no preview image.
  • The generation endpoint is rate limited against anonymous traffic.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.