Generating Social Media Cards
Social Media Cards are critical for boosting engagement when sharing links on social media websites like Twiter/X, LinkedIn, and Facebook.
They work by utilizing the the Open Graph standard with HTML meta tags
like og:image
to define the image you would like to show as a preview
when your link is shared.
You can use Astro Cloudinary to easily generate dynamic social media cards for your Astro app using the getCldOgImageUrl helper.
Example
Using getCldOgImageUrl, you can first generate the URL of the image you want to create. This can be as simple as a reference to an image in your Cloudinary account or can be a dynamically generated image with text overlays, image overlays, or any effect supported by the Trasnformation API.
For instance, if you have a blog, you may one unique Social Cards for each page, where you can apply a text overlay based on that blog’s title.