* WIP fix image integration in Netlify
* Add a changeset
* Try another way
* Get the chunks folder
* try inlining
* deep sigh
* fix some things
* more
* Remove some stuff
* remove unused imports
* Add changeset
* remove unused --copy-wasm
* Remove unused post:build
The code path changed by this commit isn't only taken when running using Vite. If the site is configured with a base url which is different from `/` but does **not** end with `/` (for example, because `trailingSlash` is set to `never`), the `- 1` results in an off-by-one error when truncating the URL.
By checking if the base url ends with `/`, we can determine the right length for the prefix to truncate.
* fix: use getSetCookie, if available
* fix: explicitly use entries
* fix(image): be defensive on node@18.14.1
* chore: update changeset
* ci: skip test in 18.14.1
* hosted on other domains -> accessed by url
* these work like remote images
* including images in public
* Update packages/integrations/image/README.md
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/integrations/image/README.md
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/integrations/image/README.md
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/integrations/image/README.md
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/integrations/image/README.md
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/integrations/image/README.md
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* reorder remote first
* Update packages/integrations/image/README.md
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/integrations/image/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Clarify SVG image gotcha info
* More wording improvements!
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* @astrojs/image: add support for SVG images
* @astrojs/image: add tests for SVG images
* @astrojs/image: update README.md with SVG format info
* Add minor changeset for @astrojs/image
* Fix remote image example
`format` prop is required for remote images
* Specify `format` is only required when using `Squoosh`
- Undo changes / Restore previous content in Remote Image Examples
- Specify `format` is only required for remote images when using Squoosh(default)
* Fix backticks
* remove 'only' and backticks on squoosh
---------
Co-authored-by: BryceRussell <19967622+BryceRussell@users.noreply.github.com>
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.