DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
Menlo Park desk6 min

How to Create WhatsApp Link Preview Images from Webpages with APITemplate.io

Use an APITemplate.io image template and Direct URL in your webpage’s og:image tag to create a WhatsApp link preview image, with a backend POST alternative and practical verification steps.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To create a WhatsApp link preview image with APITemplate.io, make an image template, generate its Direct URL, and place that URL in your webpage’s og:image metadata. You can supply different template values in the URL for different pages. APITemplate.io documents this Open Graph workflow, but it does not establish WhatsApp’s current image requirements or preview-cache behavior, so publishing the metadata is not a guarantee that every WhatsApp client will show it immediately.

How the webpage image becomes a link preview

The image is associated with the webpage through its Open Graph metadata; it is not attached to the WhatsApp message itself. APITemplate.io’s documented method generates an image from a reusable template, then uses the generated image URL as the page’s og:image value. See APITemplate.io’s Direct URL guide.

As an Amazon Associate I earn from qualifying purchases.

This separates the work into two parts: create a stable image-generation URL, then make sure the page serves the intended metadata. The available APITemplate.io documentation describes those steps. It does not establish WhatsApp’s current metadata precedence, supported image dimensions or formats, client-specific behavior, or how quickly an already-shared link may refresh. Verify platform-specific behavior with current WhatsApp or Meta guidance before relying on a particular result.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create an image template and Direct URL

  1. Create the template. In APITemplate.io, open Manage Templates, create a new image template, choose a preset or custom dimensions, and open the editor. Add text, images, shapes, or other elements on the visual canvas. Give dynamic elements clear names; you will use those names when setting their values.
  2. Set up a Direct URL. In the image editor, open the Direct URL tab, create an auth code, configure its quota and expiration settings, and save the settings. The vendor describes this as a URL-based route that does not require an API key in the URL. Review the current settings and access implications for your deployment.
  3. Build the image URL. Use the template ID, auth code, and query parameters for the named elements. APITemplate.io documents this pattern:
    https://rest.apitemplate.io/v2/create-image-url/{template_id}?auth={auth_code}&{element.property}={value}
    For a text element named headline, a parameter can look like headline.text=Summer%20sale. For an image element named background, the image source can be supplied as background.src. URL-encode values, especially spaces, ampersands, and other reserved characters; when building URLs in code, use a URL/query-string encoder rather than concatenating unescaped values.
  4. Use a distinct URL for each page’s values. Pass that page’s text or image values through the query string. APITemplate.io documents that changing query parameters can produce unique preview images from the same template. Keep a record of the parameters used for each page so later edits are consistent.

Add the generated image URL to the webpage

Place the complete Direct URL in the page’s Open Graph image tag, for example:

<meta property="og:image" content="https://rest.apitemplate.io/v2/create-image-url/TEMPLATE_ID?auth=AUTH_CODE&amp;headline.text=Summer%20sale" />

Replace the example values with the actual template ID, auth code, and encoded element values. The tag belongs in the HTML document’s <head>. Make sure the page returns the intended metadata when fetched, rather than relying on content that is only added later in the browser by client-side JavaScript. This is a practical implementation check, not a claim about WhatsApp’s current crawler behavior.

Because the Direct URL contains an auth code and query values, avoid treating it as a secret API key or assuming it has unrestricted access. Its quota and expiry are configurable; choose settings that suit the intended use and consult APITemplate.io’s current documentation for the relevant access details.

Check the page and generated image separately

  • Open the generated image URL directly and confirm that it returns the intended image rather than an error or an unexpected template output.
  • Inspect the published page’s HTML head and verify that og:image contains the complete intended URL, including correctly encoded query parameters.
  • Check that each page has the values meant for that page, especially when several pages share one template.
  • Test a newly published URL in the WhatsApp context that matters to your audience. Do not infer that an old preview will change merely because the page’s metadata has changed; current WhatsApp refresh and cache behavior is not established by the APITemplate.io documentation cited here.

Use the POST API for backend-generated images

If your application already has a backend or integration that assembles page-specific data, APITemplate.io also documents a POST workflow using the v2 create-image endpoint. It accepts a template ID, an X-API-KEY header, and JSON overrides that map template element names to replacement values. The vendor’s editor includes an API Console for composing sample JSON and previewing generated output. See the current API reference and image-generation guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the POST route when values should be assembled server-side or when your application already handles authenticated API calls. Keep the API key on the server; do not put it in public page source. APITemplate.io lists US, EU, Australia, and Singapore API endpoints in its guide; select the applicable endpoint from the vendor’s current documentation. The Direct URL and POST approaches differ in where values are assembled and how access is provided, not in a WhatsApp success rate established by the available sources.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. It can return an image or PDF from a URL, but for this workflow, APITemplate.io’s documented template and Open Graph method is the direct route to a designed, page-specific preview image. ScreenshotNeo is an alternative when you want an automated screenshot of a webpage rather than a template-built graphic.

One-call example using ScreenshotNeo (replace the target URL and API key):

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. ScreenshotNeo removes cookie banners, popups, and chat widgets before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan provides 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for ScreenshotNeo.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting missing or wrong previews

The image URL does not produce the intended graphic

  • Open the Direct URL itself and check whether its template ID and auth code are correct and whether the auth settings remain valid.
  • Confirm that query parameter names match the element names and properties in the template. A renamed element or misspelled property can prevent the expected value from being applied.
  • URL-encode dynamic values. Characters such as & can otherwise be interpreted as query-string separators instead of part of a value.
  • For the POST route, check the template ID, X-API-KEY header, and JSON override names and values. Use the editor’s API Console to preview a sample request.

The webpage has an image but WhatsApp does not show it

  • Confirm the published HTML contains the intended og:image URL in the document head, and that the value is not an outdated URL or an unencoded one.
  • Open the image URL independently to distinguish a page-metadata problem from an image-generation problem.
  • Test the current page URL in the relevant WhatsApp client and account for the possibility that previously shared or fetched previews may not update immediately. The cited APITemplate.io material does not specify WhatsApp cache-clearing steps or guarantees.
  • Check current official WhatsApp or Meta documentation for requirements and debugging options before changing image dimensions, formats, or other platform-specific settings.

Sources and scope

APITemplate.io’s current documentation supports the Direct URL and v2 POST workflows described above. Its older v1 API reference is identified as no longer supported, so use the current v2 documentation rather than implementing against that legacy route. No WhatsApp-specific image limits, cache timing, or universal display guarantee are asserted here.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.