Sign inSign up

elestio/ws-screenshot.slim

Verified Publisher

By Elestio

•Updated almost 3 years ago

Image
Integration & delivery
Monitoring & observability
Web analytics
1

100K+

elestio/ws-screenshot.slim repository overview

⁠ws-screenshot

Fast websocket + rest api screenshot server  

DEMO: http://backup15.terasp.net/⁠

⁠Install ws-screenshot server with docker

docker pull elestio/ws-screenshot.slim

⁠Run once

docker run -p 3000:3000 -it elestio/ws-screenshot.slim

Run as a docker service

docker run -d --restart always -p 3000:3000 -it elestio/ws-screenshot.slim

⁠Test

Open in your browser:

http://youripaddress:3000/

⁠Usage

⁠REST API

Make a GET request (or open the url in your browser):

/api/screenshot?resX=1280&resY=900&outFormat=jpg&isFullPage=false&url=https://vms2.terasp.net

⁠Websocket API

var event = { cmd: "screenshot", url: url, originalTS: (+new Date()), resX: resX, resY: resY, outFormat: outFormat, isFullPage: isFullPage };

You can check /public/js/client.js and /public/index.html for a sample on how to call the Websocket API

 

⁠Supported parameters

  • url: full url to screenshot, must start with http:// or https://
  • resX: integer value for screen width, default: 1280
  • resY: integer value for screen height, default: 900
  • outFormat: output format, can be jpg, png or pdf, default: jpg
  • isFullPage: true or false, indicate if we should scroll the page and make a full page screenshot, default: false

More details on the Github repo here: https://github.com/elestio/ws-screenshot/⁠

Tag summary

Content type

Image

Digest

sha256:c1a75d559…

Size

507.4 MB

Last updated

almost 3 years ago

docker pull elestio/ws-screenshot.slim

This week's pulls

Pulls:

637

Last week