diff --git a/.changeset/bright-pants-trade.md b/.changeset/bright-pants-trade.md new file mode 100644 index 0000000000..00267ad71b --- /dev/null +++ b/.changeset/bright-pants-trade.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix JPEG image size determination diff --git a/packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts b/packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts index 1ccf2d99f1..763cfc98c0 100644 --- a/packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts +++ b/packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts @@ -122,7 +122,8 @@ export const JPG: IImage = { // Every JPEG block must begin with a 0xFF if (input[i] !== 0xff) { - input = input.slice(1) + // Change from upstream: fix non-0xFF blocks skipping + input = input.slice(i) continue }