fix(squoosh): Fix wrong file path in rotation check (#7650)
This commit is contained in:
parent
de5fbd3e4b
commit
7a6b48a1a4
1 changed files with 3 additions and 1 deletions
|
@ -35,7 +35,9 @@ async function getRotationForEXIF(
|
|||
inputBuffer: Buffer
|
||||
): Promise<Operation | undefined> {
|
||||
// check EXIF orientation data and rotate the image if needed
|
||||
const meta = await imageMetadata(transform.src, inputBuffer);
|
||||
const filePath = transform.src.slice('/@fs'.length);
|
||||
const filePathURL = new URL('.' + filePath, 'file:');
|
||||
const meta = await imageMetadata(filePathURL, inputBuffer);
|
||||
|
||||
if (!meta) return undefined;
|
||||
|
||||
|
|
Loading…
Reference in a new issue