Take a full page screenshot of every page of this website, on desktop
and on mobile, and put them in a folder.
Screenshotting one page is a line of code. Screenshotting every page of a site, in a way that lets you show the set to somebody, is an afternoon. We do this for the gallery under our own build stories, where every page of a new site sits next to the old one as a screenshot. These are the things that went wrong there.
If you just want to look at one page, that is a question for the assistant: see screenshots and previews. Below is about the whole site in one go.
1. Use the menu, not the sitemap
The first reflex is the sitemap. That is the wrong list.
A WordPress site's sitemap contains the leftovers of the installation: a sample page, a first post, a privacy statement nobody finished, and with unlucky settings author and category pages as well. Those are not pages anybody wants to see.
The homepage's main menu is what the owner considers their site, and it is already in the right order. So we take the links out of the homepage navigation, in menu order, and use the link text straight away as the name of the page.
A few rules you need while doing that:
- Only links to the same domain. A link to social media does not belong.
- No
tel:andmailto:. - Deduplicate on the path, not on the whole link. An anchor like
/#pricingis the page itself. - Skip an empty link text, and therefore an icon link too.
If there is no menu, or only one link in it, you fall back to the sitemap. With a sitemap pointing at other sitemaps, follow one level deep and leave the author and taxonomy files alone.
2. Scroll through the page first
This is the pitfall that takes the longest to find, because your screenshot comes out and looks almost right.
Modern sites only load images once they come into view, and start animations as you scroll past. Take a full page screenshot straight away and you get a page with grey blocks where the photos should have been, and half finished animations.
The fix is simple: scroll through the whole page once in steps, with a short pause per step, go back to the top and wait a moment. Then take the screenshot. We scroll in steps of about eighty percent of the viewport height, with a tenth of a second pause.
Switch on the reduced motion preference too. Most animations then skip themselves and you get the end state instead of a frame from the middle.
3. Two formats, with the right number of pixels
We make two screenshots per page:
| Format | Viewport | Pixel ratio |
|---|---|---|
| desktop | 1280 by 900 | 1 |
| mobile | 390 by 844 | 2 |
The pixel ratio on mobile is not a detail. A phone has a screen with more pixels than points, and if you set that ratio to 1 the screenshot looks soft as soon as somebody views it large. Set it to 2 for desktop and you get a huge file for nothing.
For mobile, also state that it is a mobile device with a touch screen. Otherwise some sites show the desktop menu in a narrow viewport, and then your screenshot does not match what a visitor sees.
4. The height limit you forget
You only run into this on the third site, and then unexpectedly: a full page screenshot of a long one pager is quickly fifteen or twenty thousand pixels tall. The webp format cannot go above 16383 pixels.
So your screenshot works and writing the file fails. We crop a page that comes out taller at 16000 pixels. It is not pretty, but it beats an empty slot in a gallery, and in practice everything under that limit is the whole page.
5. One load attempt is not enough
Loading a site over the internet simply fails sometimes, and then your whole run stalls on page seven of twelve. We do every page up to three times, with a generous time limit, and wait until the network is quiet instead of until text appears on screen. Waiting for visible text sounds smarter and is less reliable: the text is often there before the images are.
6. Keep a record of what you made
Finally: write a small file next to the images with the list in it. Per page the name, the path and where the two screenshots are. Then you can adjust the names by hand later without redoing everything, and in a month you still know which day the set is from.
Common mistakes
Using the sitemap as the page list. You get the leftovers of the installation with it.
Taking a screenshot straight away. Scroll through the page first, or you miss every image that only loads on scroll.
Setting mobile to pixel ratio 1. The screenshot is then soft as soon as somebody views it large.
Forgetting to say that mobile is mobile. Some sites then give you the desktop menu in a narrow viewport.
Not allowing for webp's height limit. A long one pager does not fit and writing the file fails.
Waiting for visible text instead of a quiet network. The text is there before the images.
One load attempt. Do it three times before you drop the whole run.
If you only want to know whether your site looks right on mobile, you do not have to build any of this: ask the assistant, see screenshots and previews. What else the assistant can check for you is in checks for DNS, email, SSL and speed.