Content pfp
Content
@
https://www.bountycaster.xyz
0 reply
0 recast
0 reaction

Samuel ツ pfp
Samuel ツ
@samuellhuber.eth
20 USDC bounty for the fastest way to turn styled html (HTML + CSS including potential <image> tags layered etc) into an image (filetype image). reply with the fastest way, provide benchmarks why it's the fastest. No language restriction, can be any code with an open and permissive license. Provide examples proving your point that 1) the library works 2) it can be used and is blazingly fast @bountybot deadline 7 days.
19 replies
6 recasts
17 reactions

derek pfp
derek
@derek
If you're optimizing for speed, I would not introduce additional libraries like Puppeteer. The fastest way is to server-side render and run headless browser on the machine and call the browser's screenshot command directly. We use firefox because it's accelerated out of the box without additional config. You can do this with chrome as well, but requires additional flags. The performance difference is negligible. ``` firefox -headless --window-size=1910,1000 -screenshot ``` This works: we're doing this in production for scoreclips. This is a rendered HTML template (there's some overhead in the example to actually fetch the data, but the image rendering is very fast). Example: https://merlot.bunches.io/app/scoreclip/ccb6079b-5975-4b24-9108-5fc99b47e9c3 Happy to answer any additional questions! @derek
1 reply
0 recast
1 reaction

Samuel ツ pfp
Samuel ツ
@samuellhuber.eth
Firefox runs headless? So I could do build a small API around it sending in html and getting images back?
1 reply
0 recast
0 reaction