0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages/integrations/image/test
Alexey Shmalko b3e65991f7
fix(image): allow usage of image from any directory (#5932)
Currently, @astrojs/image allows *importing* images from srcDir
only. Importing images from outside srcDir fails miserably *in dev
mode* and produces incorrect src.

This happens because `path.relative(fileURLToPath(config.srcDir), id)`
resolves to "../something" and when joined with '/@astroimage' cancels
it out (`join('/@astroimage', '../../something')` => `'/something'`).

Rework /@astroimage URL scheme to be similar to "/@fs/" scheme—always
export absolute path to the target file.
2023-01-30 15:29:41 -05:00
..
fixtures fix(image): allow usage of image from any directory (#5932) 2023-01-30 15:29:41 -05:00
background-color-image-ssg.test.js [@astrojs/image] flatten background only if alpha channel isn't supported (#4800) 2022-09-20 20:25:45 +00:00
background-color-image-ssr.test.js Output assets to _astro directory (#5772) 2023-01-09 10:01:33 -06:00
get-image.test.js Output assets to _astro directory (#5772) 2023-01-09 10:01:33 -06:00
image-ssg.test.js fix(image): allow usage of image from any directory (#5932) 2023-01-30 15:29:41 -05:00
image-ssr-build.test.js Output assets to _astro directory (#5772) 2023-01-09 10:01:33 -06:00
image-ssr-dev.test.js fix(image): allow usage of image from any directory (#5932) 2023-01-30 15:29:41 -05:00
no-alt-text-image-ssg.test.js feat(image): throw if alt text is missing (#4511) 2022-09-01 21:24:07 +00:00
no-alt-text-image-ssr.test.js feat(image): throw if alt text is missing (#4511) 2022-09-01 21:24:07 +00:00
no-alt-text-picture-ssg.test.js feat(image): throw if alt text is missing (#4511) 2022-09-01 21:24:07 +00:00
no-alt-text-picture-ssr.test.js feat(image): throw if alt text is missing (#4511) 2022-09-01 21:24:07 +00:00
picture-ssg.test.js fix(image): allow usage of image from any directory (#5932) 2023-01-30 15:29:41 -05:00
picture-ssr-build.test.js fix(image): allow usage of image from any directory (#5932) 2023-01-30 15:29:41 -05:00
picture-ssr-dev.test.js fix(image): allow usage of image from any directory (#5932) 2023-01-30 15:29:41 -05:00
rotation.test.js Output assets to _astro directory (#5772) 2023-01-09 10:01:33 -06:00
sharp.test.js [@astrojs/image] support additional resize options (#4438) 2022-09-09 20:13:59 +00:00
squoosh-service.test.js fix(image): allow usage of image from any directory (#5932) 2023-01-30 15:29:41 -05:00
test-utils.js
with-mdx.test.js Output assets to _astro directory (#5772) 2023-01-09 10:01:33 -06:00