diff --git a/.changeset/khaki-ghosts-fry.md b/.changeset/khaki-ghosts-fry.md new file mode 100644 index 000000000000..d2c7f647010c --- /dev/null +++ b/.changeset/khaki-ghosts-fry.md @@ -0,0 +1,5 @@ +--- +'@astrojs/image': patch +--- + +Fixes a bug in dev when `` is used for a local image with no transformations diff --git a/packages/integrations/image/src/vite-plugin-astro-image.ts b/packages/integrations/image/src/vite-plugin-astro-image.ts index 51073ee709d2..04f2303414d7 100644 --- a/packages/integrations/image/src/vite-plugin-astro-image.ts +++ b/packages/integrations/image/src/vite-plugin-astro-image.ts @@ -93,16 +93,20 @@ export function createPlugin(config: AstroConfig, options: Required social-jpg
+ no-transforms +
Google
inline diff --git a/packages/integrations/image/test/image-ssg.test.js b/packages/integrations/image/test/image-ssg.test.js index e586070f4bfe..598b0a8ec494 100644 --- a/packages/integrations/image/test/image-ssg.test.js +++ b/packages/integrations/image/test/image-ssg.test.js @@ -28,6 +28,12 @@ describe('SSG images - dev', function () { url: '/@astroimage/assets/social.jpg', query: { f: 'jpg', w: '506', h: '253' }, }, + { + title: 'Local image no transforms', + id: '#no-transforms', + url: '/@astroimage/assets/social.jpg', + query: { } + }, { title: 'Filename with spaces', id: '#spaces', diff --git a/packages/integrations/image/test/image-ssr-dev.test.js b/packages/integrations/image/test/image-ssr-dev.test.js index e70f4af136e2..105f52717423 100644 --- a/packages/integrations/image/test/image-ssr-dev.test.js +++ b/packages/integrations/image/test/image-ssr-dev.test.js @@ -32,6 +32,13 @@ describe('SSR images - dev', function () { query: { f: 'jpg', w: '506', h: '253' }, contentType: 'image/jpeg', }, + { + title: 'Local image no transforms', + id: '#no-transforms', + url: '/@astroimage/assets/social.jpg', + query: { }, + contentType: 'image/jpeg', + }, { title: 'Filename with spaces', id: '#spaces',