diff --git a/.docs/lib/HTMLPicture.js b/.docs/lib/HTMLPicture.js
index 676c264..7e3aeaa 100644
--- a/.docs/lib/HTMLPicture.js
+++ b/.docs/lib/HTMLPicture.js
@@ -118,6 +118,8 @@ async function picture(source_image, alt, target_dir, urlpath, formats = "__AUTO
}
const target_original = path.join(target_dir, source_parsed.base);
+ if (!fs.existsSync(path.dirname(target_original)))
+ await fs.promises.mkdir(path.dirname(target_original), { recursive: true });
await fs.promises.copyFile(source_image, target_original);
const sources = await Promise.all(formats.map(async (format) => {