b3e65991f7
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. |
||
---|---|---|
.. | ||
fixtures | ||
background-color-image-ssg.test.js | ||
background-color-image-ssr.test.js | ||
get-image.test.js | ||
image-ssg.test.js | ||
image-ssr-build.test.js | ||
image-ssr-dev.test.js | ||
no-alt-text-image-ssg.test.js | ||
no-alt-text-image-ssr.test.js | ||
no-alt-text-picture-ssg.test.js | ||
no-alt-text-picture-ssr.test.js | ||
picture-ssg.test.js | ||
picture-ssr-build.test.js | ||
picture-ssr-dev.test.js | ||
rotation.test.js | ||
sharp.test.js | ||
squoosh-service.test.js | ||
test-utils.js | ||
with-mdx.test.js |