Closed 2803media closed 5 years ago
I guess it's related to the encode image and this doesn't work like the gif demo in readme...
If someone got an idea to download the screenshot with curl (not to get the binary but a png or jpg) I'll take the proposition!
With google cloud function i use this code:
const imageBuffer = await page.screenshot({path: '/tmp/gcf_'+parcelle+'_'+i+'.jpg', type: 'jpeg', quality: 95});
res.set('Content-Type', 'image/jpg');
res.send(imageBuffer);
Can you redeploy and check it once again? This commit: https://github.com/RafalWilinski/serverless-puppeteer-layers/commit/352e16c79a2a1c8f6ba18326eff56478ed0fd07b should fix it.
It works like a charm thanks @RafalWilinski !
Finally the installation works like a charm:
But the screenshot function doesn't work like expected because the image is not displayed, do I miss something?
<DEPLOYED_ENDPOINT>?address=https://google.com
But the base64 image is good, I check with a base64 decoder!