diff --git a/src/components/RandomCornerImage.astro b/src/components/RandomCornerImage.astro index 7785dbb..b1caa61 100644 --- a/src/components/RandomCornerImage.astro +++ b/src/components/RandomCornerImage.astro @@ -1,11 +1,8 @@ --- import fs from 'node:fs'; import path from 'node:path'; -import { fileURLToPath } from 'node:url'; -const galleryDirectory = fileURLToPath( - new URL('../../public/images/gallery', import.meta.url), -); +const galleryDirectory = path.resolve(process.cwd(), 'public', 'images', 'gallery'); const supportedExtensions = new Set([ '.avif',