Free tools Windows power users keep installed
One-click scans. No signup required.
Set Cypress’s screenshotsFolder option to change the base directory for screenshots. It applies to files created by cy.screenshot() and automatic failure screenshots during cypress run. The default is cypress/screenshots.
Set the project-wide screenshot folder
Add screenshotsFolder to the object passed to defineConfig() in your Cypress configuration file. For example, in a CommonJS JavaScript configuration:
As an Amazon Associate I earn from qualifying purchases.
const { defineConfig } = require('cypress')
module.exports = defineConfig({
screenshotsFolder: 'artifacts/cypress-shots',
})
Use the same option in the exported defineConfig() object in a TypeScript configuration. The path is relative to the project unless you provide an absolute path. Cypress documents cypress/screenshots as the default. Cypress configuration reference
Understand where Cypress puts each image
screenshotsFolder sets the base directory, not always the complete image path. Cypress builds paths beneath it from the spec file and screenshot name. For instance, passing actions/login as the name to cy.screenshot() creates a nested directory under the applicable spec path. Cypress screenshot command
#1 Best Overall
Cypress also removes the shared ancestor among specs when it forms generated asset paths. As a result, a screenshot from the same spec can appear at a different nested path if the set of specs included in a run changes. Avoid assuming the full generated path will be identical across differently scoped runs. Cypress screenshots and videos guide
Keep screenshots between test runs
Before cypress run, Cypress clears the contents of the screenshots folder by default; it preserves the folder itself. If you need existing generated files to remain, set trashAssetsBeforeRuns: false in the Cypress configuration. Cypress configuration reference
Rank #2
Automatic screenshots of failed tests are documented for cypress run. Cypress does not automatically capture failure screenshots during cypress open. Cypress screenshots and videos guide
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Choose between a base folder and custom relocation
| Approach | Use it for | Where it is configured | Path handling |
|---|---|---|---|
screenshotsFolder |
Changing the normal project-wide base directory | Cypress project configuration | Cypress constructs paths beneath the base from the spec and screenshot name. |
after:screenshot |
Custom Node-side handling after an image is captured, such as moving a file | setupNodeEvents in the Cypress configuration |
After moving the file, return its new absolute path so Cypress knows its updated location. Cypress after:screenshot event |
Use after:screenshot only when changing the base folder is not enough and you need custom post-capture handling. For ordinary output-directory changes, screenshotsFolder is the direct setting.
Rank #3
Troubleshoot unexpected screenshot paths
- The file is nested beneath the configured folder: Check the spec-relative path and the name passed to
cy.screenshot(); both can contribute directories or filename components. - The same spec appears at a different path in another run: The shared ancestor among the specs in a run affects the generated asset path. Compare which specs were included.
- Earlier screenshots disappeared after a run:
cypress runclears screenshot-folder contents by default. SettrashAssetsBeforeRuns: falseif those contents must remain. - A failure screenshot is missing in the interactive runner: Automatic failure capture is documented for
cypress run, notcypress open. - You moved a screenshot in an event handler but Cypress has the old location: Return the new absolute file
pathfrom theafter:screenshothandler.
Or skip the browser setup
If you need a website screenshot rather than Cypress test artifacts, ScreenshotNeo takes one with a GET request. Cookie banners, newsletter popups and chat widgets are removed before the shot; bot checks, blank pages and failed loads are never billed. AI agents can use its MCP server for screenshots. It includes 1,000 screenshots a month free with no card, and paid plans start at $5 for 3,000.
cURL example (see the ScreenshotNeo documentation):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Sign up for ScreenshotNeo and get 1,000 free screenshots a month with no card.
Quick Recap
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




