
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
page2image
Advanced tools
📷 page2image is an npm package for taking screenshot which also provides CLI command
page2image is an npm package using Headless Chrome for taking screenshots which also provides CLI command
npm i page2image --save
import Screenshot from 'page2image';
const screenshot = new Screenshot({
waitUntil: 'networkidle2',
viewportConfig: { width: 1920, height: 1080 },
screenshotConfig: { fullPage: true, path: 'screenshot.png' },
});
screenshot
.takeScreenshot('https://github.com/Runjuu')
.then(process.exit);
Accept a url string as an argument and return an image Buffer
Accept a Config object and next time calling takeScreenshot will using new config to take screenshot
falseselector is valid, page2image will take screenshot for selected elementnpm i page2image --global
# Single page
> page2image https://github.com/Runjuu --type=jpeg --quality=80
# Multi-page
> page2image https://github.com/Runjuu https://github.com/Runjuu --type=jpeg --quality=80
# Local file
> page2image ./index.html --type=jpeg --quality=80
Page width in pixels.
Page height in pixels, default will take a full page screenshot.
Specify screenshot type, could be either 'jpeg' or 'png'.
The quality of the image, between 0-100. Not applicable to png images.
Specify device scale factor.
take a screenshot for the selected element
page2image https://github.com/Runjuu --selector=".js-contribution-graph"
To disable JavaScript on the page.
When to consider navigation succeeded. more details
Wait ${sleep} milliseconds to take screenshot.
Wait for the selector to appear in page
List of all available devices is available in the source code. Below is an example of using
emulateargs to emulate iPhone 6
page2image https://github.com/Runjuu --emulate=iPhone6
Wait till viewport scroll to the bottom of the page
Name of screenshot
Path to save the screenshot
page2image https://github.com/Runjuu --path=../
page2image https://github.com/Runjuu --path=/User/someone/
page2image https://github.com/Runjuu --path=~/Downloads
FAQs
📷 page2image is an npm package for taking screenshot which also provides CLI command
We found that page2image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.