fix image file read with staging base path
All checks were successful
/ build (pull_request) Successful in 45s

This commit is contained in:
kritzl 2026-10-06 20:03:36 +02:00
commit 4cc00d26b4
Signed by: kritzl
SSH key fingerprint: SHA256:5BmINP9VjZWaUk5Z+2CTut1KFhwLtd0ZynMekKbtViM

View file

@ -55,7 +55,8 @@ for (const image_name in images_raw) {
const imageResponse = await fetch(imagePath)
buffer = Buffer.from(await imageResponse.arrayBuffer())
} else {
const imagePath = "./dist" + image.image.src
const path = image.image.src.substring((import.meta.env.BASE_URL).length).replace(/(^[\/]*|[\/]*$)/g, '')
const imagePath = "./dist/" + path
buffer = await readFile(imagePath)
}