I am using lighthouse for creating performance reports for a bunch of our own websites. I also need to take a screenshot to see how the website looks on a desktop computer.
It seems like Lighthouse by default takes a screenshot with mobile resolution.
How can I change that?
I am trying to avoid using other libraries like Puppeteer if possible.
Here's some code that runs lighthouse
import lighthouse from 'lighthouse';
import chromeLauncher from 'chrome-launcher';
const chrome = await chromeLauncher.launch({ chromeFlags: ['--headless'] });
const options = {
logLevel: 'info',
output: 'json',
onlyCategories: ['performance', 'accessibility', 'best-practices', 'seo'],
port: chrome.port
};
const runnerResult = await lighthouse(url, options);
Lighthouse returns display captures from the audits for:
screenshot-thumbnails- 120px x 213pxfinal-screenshot- 280px x 498px
Can I get anything larger than that?