fix image file read with staging base path
All checks were successful
/ build (pull_request) Successful in 45s
All checks were successful
/ build (pull_request) Successful in 45s
This commit is contained in:
parent
6d18f470bd
commit
4cc00d26b4
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue