Generate images using meta tags
To generate images using meta tags:
- Go to your template
- Expand the "Developer tools tab"
- Click on "Copy code"
You'll now be able to embed the HTML code in the <head>
of your website:
<meta property="og:image" content="https://previewlinks.io/generate/templates/719/meta?url=https://previewlinks.io/current-page-url">
<meta name="twitter:image" content="https://previewlinks.io/generate/templates/719/meta?url=https://previewlinks.io/current-page-url">
<meta name="previewlinks:title" content="Finally, a scheduling tool that just works">
<meta name="previewlinks:image" content="https://previewlinks.io/assets/logo.svg">
Please make sure the ?url=
query string is pointing to your current page. You can dynamically change the URL and data of the meta tags using the templating language of the framework/language you're using.
Here's an example in plain PHP:
<meta property="og:image" content="https://previewlinks.io/generate/templates/719/meta?url=https://<?php $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ?>">
<meta name="twitter:image" content="https://previewlinks.io/generate/templates/719/meta?url=https://<?php $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ?>">
<meta name="previewlinks:title" content="<?php echo $page->title ?>">
<meta name="previewlinks:image" content="<?php echo $page->logo ?>">
The meta tags must be server side rendered, our scraper does not execute client side JavaScript.