Skip to content

Commit

Permalink
revert file url
Browse files Browse the repository at this point in the history
  • Loading branch information
timlrx committed Apr 27, 2024
1 parent 447fec2 commit 2c59dfd
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ const getImageFieldData = ({
const documentDirPath = utils.dirname(documentFilePath)

const filePath = utils.filePathJoin(documentDirPath, imagePath)
const absoluteFilePath = URL.pathToFileURL(utils.filePathJoin(contentDirPath, documentDirPath, imagePath)).href
const absoluteFilePath = utils.filePathJoin(contentDirPath, documentDirPath, imagePath)
const relativeFilePath = utils.relative(utils.filePathJoin(contentDirPath, documentDirPath), absoluteFilePath)

const fileBuffer = yield* $(fs.readFileBuffer(absoluteFilePath))

const { resizedData, height, width, format } = yield* $(processImage(fileBuffer))
Expand Down

0 comments on commit 2c59dfd

Please sign in to comment.