Using Little Eagle Images with Next.js
Install
The Little Eagle NPM package @littleeagle/images-node is designed to be used with Next.js.
To install it in your project, run:
Loading…Examples
- Coming soon…
Generating an OG Image using Little Eagle in Next.js
1. Add your Next.js getServerSideProps function
Use the littleEagleImagesURL function to generate an image in `getServerSideProps()`. This ensure it runs on the server.
2. Add the og:image meta tag to your component
Use the ogImageURL prop to set the <meta property="og:image"> tag. We also set other OpenGraph meta tags, and make it look good on Twitter.