astro/packages/integrations/image/test/fixtures/basic-picture/src
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
..
assets [@astrojs/image]: Fix <Picture /> component with query string (#4997) 2022-10-06 15:53:11 +00:00
pages fix(image): allow usage of image from any directory (#5932) 2023-01-30 15:29:41 -05:00