From a9b55e145cd64e0ff2ba73ddcfcb0cb87fc26c5e Mon Sep 17 00:00:00 2001 From: Sergio Barros Date: Thu, 25 Aug 2022 19:53:25 +0100 Subject: [PATCH] fix for old thumbnails when generating pug report --- app/assets/report/index.pug | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/report/index.pug b/app/assets/report/index.pug index acdeefe..1c8db66 100644 --- a/app/assets/report/index.pug +++ b/app/assets/report/index.pug @@ -26,7 +26,11 @@ html screenshots.forEach((screenshot) => { let img = document.getElementById(`screenshot_${screenshot._id}`); if (img != undefined) { - img.src = screenshot.thumbnail; + let thumbnail = screenshot.thumbnail; + if (!thumbnail.startsWith('data:image')) { + thumbnail = `data:image/png;base64,${thumbnail}` + } + img.src = thumbnail; } }); }