Building an OpenGraph image generation API with Cloudinary, Netlify Functions, and React
Offered By: egghead.io
Course Description
Overview
OpenGraph images are the images you see when you paste a link into a social platform and it "unfurls" into an image, title, and description. This happens on Twitter, Discord, Slack, and many other platforms. This collection goes over everything from designing OpenGraph images in Figma, to implementing them in CodeSandbox, to returning headless browser screenshots from Netlify Functions, and finally using Cloudinary as a write-through cache.
You will come away from this collection with the ability to ship an API that you can use on any of your sites, and also on-demand, that can generate images for not only OpenGraph unfurls, but also for Instagram, GitHub, and more. Using headless browsers with playwright to generate our images means we get full access to all the responsive power of CSS and all the logical power of JS to handle layout, importing assets like pngs, choosing different fonts, and more.
The image below is generated via the project you'll build and deploy in this course.
An efficient and practical course to learn how to design and create an OpenGraph for your projects. This course is still valid and relevant, with some minor differences in name dependencies, yet there are not major breaking changes.
You will come away from this collection with the ability to ship an API that you can use on any of your sites, and also on-demand, that can generate images for not only OpenGraph unfurls, but also for Instagram, GitHub, and more. Using headless browsers with playwright to generate our images means we get full access to all the responsive power of CSS and all the logical power of JS to handle layout, importing assets like pngs, choosing different fonts, and more.
The image below is generated via the project you'll build and deploy in this course.
An efficient and practical course to learn how to design and create an OpenGraph for your projects. This course is still valid and relevant, with some minor differences in name dependencies, yet there are not major breaking changes.
Syllabus
- Designing OpenGraph unfurls in Figma
- Building an OpenGraph image React component in CodeSandbox, based on a Figma design
- Setting up a new GitHub repo to deploy functions on Netlify with Make and netlify.toml
- Scaffolding and deploying a Netlify Function in JavaScript
- Using Playwright to screenshot the DOM and return an image from a Netlify Function
- Compiling a React to an IIFE with Rollup to execute and render in a headless browser
- Setting the viewport on a Playwright headless browser
- Testing an opengraph image with the Twitter Card Validator
- Passing variables to serverless functions using query strings
- Using Cloudinary as a write-through cache for a Netlify Function that generates images
- Using _redirects files on Netlify to make .netlify function URLs more user-friendly
Taught by
Chris Biscardi
Related Courses
Learn Javascript - 21 Essential Array MethodsCoursera Project Network via Coursera 3D Graphics for Web Developers
Pompeu Fabra University via FutureLearn A Simple Scatter Plot using D3 js
Coursera Project Network via Coursera Access WebView in an Android Studio Project
Coursera Project Network via Coursera Deployment Pipelines using GitHub Actions
A Cloud Guru