Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BACKLOG] Use canvas alternative for generating dynamic OG image #528

Open
1 of 6 tasks
saenyakorn opened this issue Feb 18, 2023 · 1 comment
Open
1 of 6 tasks

Comments

@saenyakorn
Copy link
Member

Problem

Describe the bug

Canvas is the one of hard-to-install library. It require a lot of external dependencies. Also, our web's Dockerfile need to install that dependencies only for canvas library, that make our image a bit larger. For, OSX users need to install more dependencies just for running the web, see more info.

Task Description

From my quick search result, I found the other solution that suite our requirement using

  1. @vercel/og
  2. next-api-og-image

So, in my opinion, it's possible to remove canvas from web's dependencies (ASAP).

Additional Context

No response

Related Teams

  • Frontend
  • Backend
  • Data
  • Design
  • Infra
  • QA

Task Advisors

@saenyakorn

@suphon-t
Copy link
Member

Do note that @vercel/og only supports vercel’s edge runtime, and next-api-og-image needs a browser to work.
A possible solution would be using satori + resvg-js.

But personally, I think those external dependencies are not an issue at all. We just have to fix the Dockerfile and that’s it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants