phovea/phovea_clue

Assess browserless.io for taking screenshots in a headless Chrome

thinkh opened this issue · 0 comments

Currently we are using the alpeware/chrome-headless-trunk Docker image (see https://github.com/phovea/phovea_clue/blob/master/deploy/_docker-compose.partial.yml#L12-L15), which requires some custom python code to take a screenshot.

With browserless.io we can use the docker image and get a screenshot using a REST request:

{
  "url": "https://example.com",
  // See https://github.com/GoogleChrome/puppeteer/blob/v1.4.0/docs/api.md#pagescreenshotoptions for more details
  "options": {
    "type": "jpeg",
    "quality": 10
  }
}

Further resources: