begin working on animation support

This commit is contained in:
Rik Berkelder 2025-03-12 16:38:23 +01:00
parent beaa79b377
commit 9f367cb9b2
9 changed files with 24 additions and 10 deletions

View file

@ -10,14 +10,15 @@ const conf = {
const dir = path.dirname(data.page.inputPath);
const files = fs.readdirSync(dir)
.filter(file => ['.png', '.jpg', '.jpeg', '.JPG'].includes(path.extname(file)))
.filter(file => ['.png', '.jpg', '.jpeg', '.JPG', '.webp'].includes(path.extname(file)))
.sort();
const images = await Promise.all(files.map(async (image) => {
const imagePath = path.resolve(dir + '/' + image);
const exif = await exifr.parse(imagePath, { pick: ['XPComment', 'DateTimeOriginal'] });
//const exif = await exifr.parse(imagePath, { pick: ['XPComment', 'DateTimeOriginal'] });
const exif = {};
return {
url: data.page.url + image,