Skip to content

#4252 Use vercel og to generate og images for meetings and apps.#4943

Merged
zomars merged 22 commits intomainfrom
feature/og-images
Oct 18, 2022
Merged

#4252 Use vercel og to generate og images for meetings and apps.#4943
zomars merged 22 commits intomainfrom
feature/og-images

Conversation

@JeroenReumkens
Copy link
Copy Markdown
Contributor

@JeroenReumkens JeroenReumkens commented Oct 11, 2022

What does this PR do?

Generates OG images for apps and meetings with the new Vercel OG.
Pages it generates images for:

  • /apps/...
  • /[user]
  • /[user]/[type]
  • /team/[slug]
  • /team/[slug]/[type]

Small tweaks needed after a check in prod

It seems that for the avatars there's quite a few ways in which they might be used; users do/don't have avatars, teams do/don't, and sometimes it seems to return an avatar while other times it could return a base64 string (which @zomars I believe is removing soon). So I can imagine there's some edge cases that I couldn't find locally (image upload locally also doesn't work on my end), so I think we also have to test this heavily in production, and see which cases aren't handled yet. If an image breaks, it's the api route that breaks for that one image, so the image simply won't load. It should not impact the page itself. Curious what others think about this 😄

Preview images

Single user

image

Collection, lots of people and long title

image

Team of 2 (collection)

image

Round robin

image

Dynamic collective

image

App

image

Fixes #4252

Environment: Staging(main branch)

Type of change

  • New feature (non-breaking change which adds functionality)

How should this be tested?

  • Ensure OG images render properly on the pages mentioned at the beginning of this PR. You find the OG images in the source of the page, look for a meta tag with the name og:image

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 11, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
cal ✅ Ready (Inspect) Visit Preview Oct 18, 2022 at 1:34PM (UTC)

@@ -1,4 +1,4 @@
<svg id="svg" version="1.1" xmlns="http://www.w3.org/2000/svg" width="1.25em" height="1.25em" viewBox="0, 0, 400,400">
<svg id="svg" xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0,0,400,400">
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to tweak a few SVG's because otherwise vercel/og wouldn't render them.

import { NextSeo, NextSeoProps } from "next-seo";
import React from "react";

import { constructAppImage, constructMeetingImage } from "@calcom/lib/OgImages";
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The v2 of head-seo doesn't seem to be used at all yet, but I did update it since chance is big this one remains and the other gets deleted :)

@JeroenReumkens JeroenReumkens changed the title DRAFT: #4252 Use vercel og to generate og images for meetings and apps. #4252 Use vercel og to generate og images for meetings and apps. Oct 18, 2022
@JeroenReumkens JeroenReumkens marked this pull request as ready for review October 18, 2022 13:45
@JeroenReumkens JeroenReumkens requested review from a team and ciaranha October 18, 2022 13:47
@JeroenReumkens JeroenReumkens self-assigned this Oct 18, 2022
Copy link
Copy Markdown
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LFG

Ship it

@zomars zomars merged commit 5c01467 into main Oct 18, 2022
@zomars zomars deleted the feature/og-images branch October 18, 2022 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

og-image (social media preview) for apps (app.cal.com/apps/zoom)

2 participants