powered by
Renders a website and returns raw image bytes.
screenshotbase_take( url, format = NULL, quality = NULL, full_page = NULL, viewport_width = NULL, viewport_height = NULL, apikey = NULL )
A raw vector of the image content.
URL of the website to render (required).
Image format: one of "png", "jpg", "jpeg", "gif".
"png"
"jpg"
"jpeg"
"gif"
Integer quality for jpg/jpeg (defaults to 80 on server if not set).
Logical; capture full page.
Integers for viewport size in pixels.
Optional API key to override the session key.
if (FALSE) { set_api_key("YOUR-API-KEY") bytes <- screenshotbase_take("https://bbc.com", format = "png", full_page = TRUE) writeBin(bytes, "screenshot.png") }
Run the code above in your browser using DataLab