If no background is specified in loader options while using the CloudFlare Images loader, the service will error because of a syntax error.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Load an image with default loader options and using <Image loader={cloudflareImagesLoader}>. Render the page. Expect the image not to render; CloudFlare Image Resizing responds with error message similar to:
Expected behavior
It should show the image, I suppose
Screenshots or Videos
No response
Platform
I'm using OS X on a M1 Mac Mini in Arc browser (Chromium-based), but I suspect this'll happen regardless of environment
Additional context
I'm pretty sure the issue is targeted to how the rgba() values are being calculated -- specifically the .toFixed(2), which transforms zero like Number(0).toFixed(2) => "0.00". I wonder if tooling is available to help calculate these values, but I'm not sure. Leaving this bug report so the issue is noted -- I will try to find a fix if I can
Describe the bug
If no background is specified in loader options while using the CloudFlare Images loader, the service will error because of a syntax error.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Load an image with default loader options and using
<Image loader={cloudflareImagesLoader}>
. Render the page. Expect the image not to render; CloudFlare Image Resizing responds with error message similar to:Expected behavior
It should show the image, I suppose
Screenshots or Videos
No response
Platform
I'm using OS X on a M1 Mac Mini in Arc browser (Chromium-based), but I suspect this'll happen regardless of environment
Additional context
I'm pretty sure the issue is targeted to how the rgba() values are being calculated -- specifically the
.toFixed(2)
, which transforms zero likeNumber(0).toFixed(2) => "0.00"
. I wonder if tooling is available to help calculate these values, but I'm not sure. Leaving this bug report so the issue is noted -- I will try to find a fix if I can