illustration for Building an OpenGraph image generation API with Cloudinary, Netlify Functions, and React

Building an OpenGraph image generation API with Cloudinary, Netlify Functions, and React

Instructor

Chris Biscardi
53m closed-captioning
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
4.3
56
people completed
Bookmark
Download
RSS

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.

An example opengraph image

What you'll learn

  • Design an OpenGraph image in Figma
  • Build the OpenGraph image as a React component
  • Deploy Netlify functions in JavaScript
  • Testing your OpenGraph with Twitter Card Validator
  • Use Cloudinary as a write-through cache

Questions to Reflect Upon:

  • Why is important to include an OpenGraph image in my project?
  • How to use a headless browser?

Learner Reviews

  • Learner
    2 years ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    Great course but a bit outdated which made it hard to follow. I totally get that the author can't keep updating the course indefinitely. Overall I would recommend this course to others.

  • Joel Hooks
    4 years ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    This course is excellent and we used it as a basis for all of our og:images here on egghead.io

Course Content

53m • 11 lessons

    You might also like these resources:

    illustration for Introduction to Cloudflare Workers

    Introduction to Cloudflare Workers

    Kristian Freeman・36m・Course

    Become familiar with the Workers CLI wrangler that we will use to bootstrap our Worker project. From there you'll understand how a Worker receives and returns requests/Responses. We will also build this serverless function locally for development and deploy it to a custom domain.

    illustration for Create an eCommerce Store with Next.js and Stripe Checkout

    Create an eCommerce Store with Next.js and Stripe Checkout

    Colby Fayock・1h 4m・Course

    This is a practical project based look at building a working e-commerce store using modern tools and APIs. Excellent for a weekend side-project for your developer project portfolio

    illustration for Practical Git for Everyday Professional Use

    Practical Git for Everyday Professional Use

    Trevor Miller・1h・Course

    git is a critical component in the modern web developers tool box. This course is a solid introduction and goes beyond the basics with some more advanced git commands you are sure to find useful.