You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: Satori functions correctly in the OG-Image Playground (Reproduction)
However, in any Next.js app, the bug occurs. I've tried the lastest next-js and satori releases as well as a few versions back. To reproduce this, git clone https://github.com/ashwin-mahadevan/satori-decimal-hue-reproduction, start the Next server, and navigate to / or /?decimal=true.
or use the following code in an app-router route.tsx file:
import{ImageResponse}from"next/og";exportfunctionGET(request){constdecimal=request.nextUrl.searchParams.get("decimal")==="true";constelement=(<divstyle={{display: "flex",width: 256,height: 256,backgroundColor: decimal
? "hsl(20.5 90.2% 48.2%)"// Shows black image with decimal hue.
: "hsl(21 90.2% 48.2%)",// Shows correct orange image with integer hue.}}/>);returnnewImageResponse(element,{width: 256,height: 256});}
The text was updated successfully, but these errors were encountered:
Bug report
Description / Observed Behavior
When a decimal point is provided
Expected Behavior
How did you expect Satori to behave here?
Reproduction
Note: Satori functions correctly in the OG-Image Playground (Reproduction)
However, in any Next.js app, the bug occurs. I've tried the lastest next-js and satori releases as well as a few versions back. To reproduce this,
git clone https://github.com/ashwin-mahadevan/satori-decimal-hue-reproduction
, start the Next server, and navigate to/
or/?decimal=true
.or use the following code in an app-router
route.tsx
file:The text was updated successfully, but these errors were encountered: