github withastro/astro @astrojs/image@0.9.0

latest releases: astro@5.0.0-beta.6, @astrojs/vue@5.0.0-beta.1, @astrojs/mdx@4.0.0-beta.3...
2 years ago

Minor Changes

  • #4909 989298961 Thanks @tony-sull! - Adds caching support for transformed images 🎉

    Local images will be cached for 1 year and invalidated when the original image file is changed.

    Remote images will be cached based on the fetch() response's cache headers, similar to how a CDN would manage the cache.

    cacheDir

    By default, transformed images will be cached to ./node_modules/.astro/image. This can be configured in the integration's config options.

    export default defineConfig({
    	integrations: [image({
        // may be useful if your hosting provider allows caching between CI builds
        cacheDir: "./.cache/image"
      })]
    });
    

    Caching can also be disabled by using cacheDir: false.

Patch Changes

  • #4933 64a1d712e Thanks @tony-sull! - Fixes a bug in dev when <Image /> is used for a local image with no transformations

Don't miss a new astro release

NewReleases is sending notifications on new releases.