I'm taking screenshot in my runs after every run but want to reduce the size so that it doesn't occupy too much space: every screenshot is 1mb on average, having 200 test with screenshot attached will give 200mb only for screenshots. Attaching it to allure report
@Attachment
public byte[] attachScreenshot() {
try {
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
} catch (Exception ignore) {return null;}
}
Any ideas on how to shrink the screenshot size?