How to save screenshots automatically in base Folder or any specified folder?

helpers: {
ResembleHelper: {
require: “codeceptjs-resemblehelper”,
baseFolder: “./_output/base”,
diffFolder: “./_output/diff/”,
prepareBaseImage: true,

In order to see the visual difference between 2 images/screeshots, I have to store screenshots manually in baseFolder. Is there a way where can I store screenshots automatically in base folder or any specified folder?

You’re doing it right by setting “prepareBaseImage” to “true”, but I realized there is a bug currently in library “codeceptjs-resemble-helper” and it does not work as expected when configured on helper level.

A workaround would be to set the parameter to “true” at each “I.seeVisualDiff”:

I.seeVisualDiff('screenshot.png', {tolerance: 0, prepareBaseImage: true});

To make it a bit more convenient introduced a env variable, I called it “ACCEPT”

I.seeVisualDiff('screenshot.png', {tolerance: 0, prepareBaseImage: !!process.env.ACCEPT});

When I’m fine with the diffs I then run my suite with:

ACCEPT=true npx codeceptjs run

Thanks for you response. The above answer is saving screenshots after comparison . But what I want to achieve is:
Save screenshots in base folder when I run

I.saveScreenshot("screenshot.png", true);