brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: :screenshot --fullpage in the Firefox console saves the whole page as a PNG

Firefox
~/tips/tip-firefox-console-screenshot-fullpage

:screenshot --fullpage

Captures the entire web page, including what is below the fold, as a PNG file.

Stitching screenshots together by hand is no fun. The Firefox Web Console has a command that captures the whole page, below the fold included.

Open the Web Console and type a command that starts with a colon:

:screenshot --fullpage

According to the Firefox docs, --fullpage saves the full webpage, including the parts outside the window. Without a filename, the image is named like Screen Shot yyyy-mm-dd at hh.mm.ss.png. You can give your own name, which should end in .png:

:screenshot --filename frontpage.png --fullpage

There are a few more options. --selector takes a CSS selector and captures only that element, --dpr sets the device pixel ratio, and --clipboard copies the picture to the clipboard. --file saves to a file even when you use other options as well.

:screenshot --selector "#main" --dpr 2

That grabs one block at double density, which is handy for a sharp picture of a single component in a blog post.

The docs have an oddity. The page says the full-page capture appends -fullpage to the file name, with a single dash, which does not match the double-dash flag in its own table. Check the file name that appears in your download folder instead of assuming the name. The docs also do not say where the file is saved, so I would not build a script on a fixed location.

Further reading: Firefox Source Docs: Web Console helpers

More Firefox tips view-source:https://www.mozilla.org/#line100 ^ invoice history about:processes right-click the request > Edit and Resend Windows and Linux: Ctrl+B All Firefox tips (10) All topics

Link