Skip to content

Commit

Permalink
fix(plugin): fix invalid object url
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWalli committed Aug 18, 2024
1 parent 88d62aa commit dfe4c5a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/tmpl/plugin.tmpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,14 @@ async function getImageSize (src) {
module => module.default || module
);
const data = await fetchRetry(URL.createObjectURL(blob), undefined, 3).then(async res =>
const objectUrl = URL.createObjectURL(blob);
const data = await fetchRetry(objectUrl, undefined, 3).then(async res =>
Buffer.from(await res.arrayBuffer())
);
const dimension = await imageMeta(data);
URL.revokeObjectURL(blob)
URL.revokeObjectURL(objectUrl);
dimensionCache.set(url, dimension);
}
Expand Down

0 comments on commit dfe4c5a

Please sign in to comment.