Generate a webpage screenshot

generate_screenshot(
  url,
  quality = 100L,
  full_page = FALSE,
  mobile = FALSE,
  width = NULL,
  type = c("jpeg", "png", "webp"),
  ...
)

Arguments

url

the URL to screenshot

quality

image quality. Defaults to 100 (i.e. 100%)

full_page

generate a full page scren shot (may be very "long"). Default FALSE.

mobile

generate a screenshot of a mobile version of the website? Default FALSE.

width

screen width (pixels). Defaults to NULL which uses the Statically default (which appears to be 1280).

type

which image format to request. This function returns a {magick} object regardless of what is specified here. Using a type other than "jpeg" (the API default and this function's default) may result in subtly different captures.

...

passed on to httr::GET().

Value

{magick} object

Examples

# NOT RUN {
generate_screenshot("https://cran.r-project.org")
# }