astro/packages/integrations/image/test/fixtures/basic-image
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
..
public Image integration refactor and cleanup (#4482) 2022-08-30 21:09:44 +00:00
server Adds an @astrojs/image integration for optimizing images (#3694) 2022-07-01 15:47:48 +00:00
src fix(image): allow usage of image from any directory (#5932) 2023-01-30 15:29:41 -05:00
astro.config.mjs Adding an optional image service based on Squoosh (#4738) 2022-09-22 19:48:14 +00:00
package.json Adding an optional image service based on Squoosh (#4738) 2022-09-22 19:48:14 +00:00
social.png fix(image): allow usage of image from any directory (#5932) 2023-01-30 15:29:41 -05:00