Create dynamic social share images using Netlify On-demand Builders.
Like this project? Help support my projects and buy me a coffee via ko-fi.
Add the /netlify/functions/social-image
directory to your own project and in your social card image tags link to the function's exposed URL adding the text you would like displayed.
https://your-project.netlify.app/.netlify/functions/social-image/title/<TITLE_TEXT>
Make sure to also add the required dependencies from package.json
to your project.
The image template can be easily modified and is generated from the template.html
file found in the /netlify/functions/social-image
directory.
The h1 tag is automatically modified by the function to include the specified title text.
Chris Johnson - defaced.dev - @defaced