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

Unsupported image type: unknown in production only #626

Open
jaobrown opened this issue Jun 25, 2024 · 0 comments
Open

Unsupported image type: unknown in production only #626

jaobrown opened this issue Jun 25, 2024 · 0 comments

Comments

@jaobrown
Copy link

Bug report

Description / Observed Behavior

Encountering intermittent issues with Satori in production when generating open-graph cards. Errors logged in Sentry indicate problems with image loading:

  1. Can't load image https://media.contra.com/image/upload/jia31bllciyyeeulttkr.jpg: Unsupported image type: unknown
  2. Error: Image size cannot be determined. Please provide the width and height of the image.

Despite these errors, the image URL functions as expected when accessed directly. The issue does not occur in local environments or consistently in production, making it challenging to reproduce.

Expected Behavior

Satori should load and process the images without errors, consistently generating the open-graph cards with the provided images from Cloudinary.

Reproduction

Unable to reproduce the issue locally or intentionally in production—the issue is intermittently throwing and only production environment.

Here is an example URL where the error has been thrown:
http://contra.com/@internal/open-graph-card/user/blesscreatics

Additional Context

  • Satori version: ^0.10.13
  • Using Cloudinary for images embedded into generated SVG.
  • The error seems to occur randomly and not on every request.
  • The image dimensions are fixed and provided in the code, but Satori still throws an error regarding the image size.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant