element
option for screenshots. See Screenshot options for all available screenshot options.
Example
Output

Optimise the output
To optimize the output with for example more paddings around the element, theviewport
option in combination with the overlay
option can be used.
Providing the
viewport
option will make sure the screenshot is taken with that viewport, afterwards that viewport is used as
size to add the background
to. We are setting margin
to 0
as otherwise the default value will increase the viewport of the background.
Optimised output
