Using nextjs's ImageResponse #7091
tianhuil
started this conversation in
Feature requests
Replies: 1 comment 1 reply
-
It is not possible, they use a third-party library for that which has its own api for styling, see https://github.com/vercel/satori#css |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.11.2
What package has an issue?
@mantine/core
What framework do you use?
Next.js
In which browsers you can reproduce the issue?
All
Describe the bug
Nextjs provides ImageResponse to generate open graph images from HTML / CSS: https://nextjs.org/docs/app/api-reference/functions/image-response
This does not work out of the box with something like:
and it's not quite clear how to proceed. This would be very useful because we may want to preview some of our Mantine webpage in the open graph image.
If possible, include a link to a codesandbox with a minimal reproduction
No response
Possible fix
I think the issue is getting
.css
into these components inline. If someone could provide a general outline, I would be happy to write up a solution / contribute an article more fully.Self-service
Beta Was this translation helpful? Give feedback.
All reactions