[GH-ISSUE #637] Make OG images great again #179

Closed
opened 2026-02-26 18:45:44 +03:00 by kerem · 12 comments
Owner

Originally created by @Mythie on GitHub (Nov 8, 2023).
Original GitHub issue: https://github.com/documenso/documenso/issues/637

Originally assigned to: @anjy7 on GitHub.

Improvement Description

Currently our signing card OG image has to use a helper function called getAssetBuffer which hits the live site to get the images and fonts that it requires.

This is super slow and results in a decent lag time for image generation which had caused issues with Twitter OG cards that we've temporarily fixed by prewarming (#615) the images prior to sharing but this is a bandaid rather than a full term fix.

I would ideally like to see us use the automagical fetch(new URL('path/to/asset', import.meta.env)) API as described in the below documentation but have encountered numerous errors in doing so:

https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image#generate-images-using-code-js-ts-tsx

Bonus points for extracting the assets to a separate package in the monorepo so we store them all in one place rather than the current duplication occurring in the marketing and web apps.

Rationale

Speeding up open graph image generation would be a big win and solve a number of headaches that we're currently facing.

Proposed Solution

Making OG images great again

Alternatives (optional)

N/A

Additional Context

N/A

Please check the boxes that apply to this improvement suggestion.

  • I have searched the existing issues and improvement suggestions to avoid duplication.
  • I have provided a clear description of the improvement being suggested.
  • I have explained the rationale behind this improvement.
  • I have included any relevant technical details or design suggestions.
  • I understand that this is a suggestion and that there is no guarantee of implementation.
Originally created by @Mythie on GitHub (Nov 8, 2023). Original GitHub issue: https://github.com/documenso/documenso/issues/637 Originally assigned to: @anjy7 on GitHub. ### Improvement Description Currently our signing card OG image has to use a helper function called `getAssetBuffer` which hits the live site to get the images and fonts that it requires. This is super slow and results in a decent lag time for image generation which had caused issues with Twitter OG cards that we've temporarily fixed by prewarming (#615) the images prior to sharing but this is a bandaid rather than a full term fix. I would ideally like to see us use the automagical `fetch(new URL('path/to/asset', import.meta.env))` API as described in the below documentation but have encountered numerous errors in doing so: https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image#generate-images-using-code-js-ts-tsx **Bonus points for extracting the assets to a separate package in the monorepo so we store them all in one place rather than the current duplication occurring in the marketing and web apps.** ### Rationale Speeding up open graph image generation would be a big win and solve a number of headaches that we're currently facing. ### Proposed Solution Making OG images great again ### Alternatives (optional) N/A ### Additional Context N/A ### Please check the boxes that apply to this improvement suggestion. - [X] I have searched the existing issues and improvement suggestions to avoid duplication. - [X] I have provided a clear description of the improvement being suggested. - [X] I have explained the rationale behind this improvement. - [X] I have included any relevant technical details or design suggestions. - [X] I understand that this is a suggestion and that there is no guarantee of implementation.
kerem 2026-02-26 18:45:44 +03:00
Author
Owner

@Mythie commented on GitHub (Nov 8, 2023):

/bounty 150

<!-- gh-comment-id:1801703146 --> @Mythie commented on GitHub (Nov 8, 2023): /bounty 150
Author
Owner

@algora-pbc[bot] commented on GitHub (Nov 8, 2023):

💎 $150 bounty created by Mythie
🙋 If you start working on this, comment /attempt #637 to notify everyone
👉 To claim this bounty, submit a pull request that includes the text /claim #637 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to documenso/documenso!

Attempt Started (GMT+3) Solution
🟢 @neo773 Nov 8, 2023, 2:31:34 PM #639
🔴 @MohakBajaj Nov 8, 2023, 6:18:55 PM WIP
<!-- gh-comment-id:1801703216 --> @algora-pbc[bot] commented on GitHub (Nov 8, 2023): ~~💎 **$150** bounty created by Mythie~~ ~~🙋 If you start working on this, comment `/attempt #637` to notify everyone~~ ~~👉 To claim this bounty, submit a pull request that includes the text `/claim #637` somewhere in its body~~ ~~📝 Before proceeding, please make sure you can [**receive payouts**](https://docs.algora.io/bounties/payments#country-support) in your country~~ ~~💵 Payment arrives in your account 2-5 days after the bounty is rewarded~~ ~~💯 You keep 100% of the bounty award~~ ~~🙏 Thank you for contributing to documenso/documenso!~~ <table> <thead> <tr> <th>Attempt</th> <th>Started (GMT+3)</th> <th>Solution</th> </tr> </thead> <tbody> <tr> <td>🟢 @neo773</td> <td>Nov 8, 2023, 2:31:34 PM</td> <td><a href="https://github.com/documenso/documenso/pull/639">#639</a></td> </tr> <tr> <td>🔴 @MohakBajaj</td> <td>Nov 8, 2023, 6:18:55 PM</td> <td>WIP</td> </tr> </tbody> </table>
Author
Owner

@anjy7 commented on GitHub (Nov 8, 2023):

Hi @Mythie , I would like to take this one

<!-- gh-comment-id:1801704918 --> @anjy7 commented on GitHub (Nov 8, 2023): Hi @Mythie , I would like to take this one
Author
Owner

@neo773 commented on GitHub (Nov 8, 2023):

/attempt #637

Options
<!-- gh-comment-id:1801705029 --> @neo773 commented on GitHub (Nov 8, 2023): /attempt #637 <details id="algora-options"> <summary>Options</summary> <ul> <li> <a href="https://console.algora.io/api/bounties/clopohop60002le0gch1d5qw6/cancel-attempt"> Cancel my attempt </a> </li> </ul> </details>
Author
Owner

@Mythie commented on GitHub (Nov 8, 2023):

Hi @Mythie , I would like to take this one

I'll assign you but will note that neo773 basically commented at the exact same time. Due to this unique situation ya'll can both work on it, if two solutions are presented I'll have to consider what to do at that time 😅

<!-- gh-comment-id:1801709143 --> @Mythie commented on GitHub (Nov 8, 2023): > Hi @Mythie , I would like to take this one I'll assign you but will note that neo773 basically commented at the exact same time. Due to this unique situation ya'll can both work on it, if two solutions are presented I'll have to consider what to do at that time 😅
Author
Owner

@rishi-raj-jain commented on GitHub (Nov 8, 2023):

@Mythie Can I work on this as well? I see 2 hours have passed.

<!-- gh-comment-id:1801908699 --> @rishi-raj-jain commented on GitHub (Nov 8, 2023): @Mythie Can I work on this as well? I see 2 hours have passed.
Author
Owner

@Mythie commented on GitHub (Nov 8, 2023):

Let’s let these two work on it for now and check in on progress in a few days 😄

<!-- gh-comment-id:1801911807 --> @Mythie commented on GitHub (Nov 8, 2023): Let’s let these two work on it for now and check in on progress in a few days 😄
Author
Owner

@rishi-raj-jain commented on GitHub (Nov 8, 2023):

Awesome!

<!-- gh-comment-id:1801912788 --> @rishi-raj-jain commented on GitHub (Nov 8, 2023): Awesome!
Author
Owner

@MohakBajaj commented on GitHub (Nov 8, 2023):

/attempt #637

Options
<!-- gh-comment-id:1802100943 --> @MohakBajaj commented on GitHub (Nov 8, 2023): /attempt #637 <details id="algora-options"> <summary>Options</summary> <ul> <li> <a href="https://console.algora.io/api/bounties/clopohop60002le0gch1d5qw6/cancel-attempt"> Cancel my attempt </a> </li> </ul> </details>
Author
Owner

@algora-pbc[bot] commented on GitHub (Nov 8, 2023):

Note: The user @neo773 is already attempting to complete issue #637 and claim the bounty. If you attempt to complete the same issue, there is a chance that @neo773 will complete the issue first, and be awarded the bounty. We recommend discussing with @neo773 and potentially collaborating on the same solution versus creating an alternate solution.

<!-- gh-comment-id:1802101201 --> @algora-pbc[bot] commented on GitHub (Nov 8, 2023): Note: The user @neo773 is already attempting to complete issue #637 and claim the bounty. If you attempt to complete the same issue, there is a chance that @neo773 will complete the issue first, and be awarded the bounty. We recommend discussing with @neo773 and potentially collaborating on the same solution versus creating an alternate solution.
Author
Owner

@algora-pbc[bot] commented on GitHub (Nov 8, 2023):

💡 @neo773 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

<!-- gh-comment-id:1802219735 --> @algora-pbc[bot] commented on GitHub (Nov 8, 2023): 💡 @neo773 submitted a [pull request](https://github.com/documenso/documenso/pull/639) that claims the bounty. You can [visit your bounty board](https://console.algora.io/org/Documenso/bounties) to reward.
Author
Owner

@algora-pbc[bot] commented on GitHub (Nov 14, 2023):

🎉🎈 @neo773 has been awarded $150! 🎈🎊

<!-- gh-comment-id:1809427812 --> @algora-pbc[bot] commented on GitHub (Nov 14, 2023): 🎉🎈 @neo773 has been awarded **$150**! 🎈🎊
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#179
No description provided.