astro/packages/integrations/image/CHANGELOG.md
Houston (Bot) 2ac1c1e260 [ci] release (beta) (#7897)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-08 11:04:14 +01:00

61 KiB

@astrojs/image

1.0.0-beta.0

Minor Changes

  • 1eae2e3f7 Thanks @Princesseuh! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.

Patch Changes

0.17.3

Patch Changes

0.17.2

Patch Changes

0.17.1

Patch Changes

0.17.0

Minor Changes

  • #7260 39403c32f Thanks @natemoo-re! - Unflags support for output: 'hybrid' mode, which enables pre-rendering by default. The additional experimental.hybridOutput flag can be safely removed from your configuration.

Patch Changes

0.16.9

Patch Changes

0.16.8

Patch Changes

0.16.7

Patch Changes

0.16.6

Patch Changes

0.16.5

Patch Changes

  • #6714 ff0430786 Thanks @bluwy! - Add build.assetsPrefix option for CDN support. If set, all Astro-generated asset links will be prefixed with it. For example, setting it to https://cdn.example.com would generate https://cdn.example.com/_astro/penguin.123456.png links.

    Also adds import.meta.env.ASSETS_PREFIX environment variable that can be used to manually create asset links not handled by Astro.

  • Updated dependencies [489dd8d69, a1a4f45b5, a1108e037, 8b88e4cf1, d54cbe413, 4c347ab51, ff0430786, 2f2e572e9, 7116c021a]:

    • astro@2.2.0

0.16.4

Patch Changes

0.16.3

Patch Changes

0.16.2

Patch Changes

  • #6548 4685f5554 Thanks @matthewp! - Use base64 encoded modules for Squoosh integration

    This moves @astrojs/image to use base64 encoded versions of the Squoosh wasm modules. This is in order to prevent breakage in SSR environments where your files are moved around. This will fix usage of the integration in Netlify.

  • Updated dependencies [9caf2a9cc, d338b6f74]:

    • astro@2.1.6

0.16.1

Patch Changes

0.16.0

Minor Changes

Patch Changes

0.15.1

Patch Changes

0.15.0

Minor Changes

Patch Changes

0.14.1

Patch Changes

0.14.0

Minor Changes

Patch Changes

0.13.1

Patch Changes

0.13.0

Minor Changes

  • #5584 9963c6e4d & #5842 c4b0cb8bf Thanks @wulinsheng123 and @natemoo-re! - Breaking Change: client assets are built to an _astro directory in the build output directory. Previously these were built to various locations, including assets/, chunks/ and the root of build output.

    You can control this location with the new build configuration option named assets.

  • #5707 5eba34fcc Thanks @bluwy! - Remove astro:build:start backwards compatibility code

  • #5806 7572f7402 Thanks @matthewp! - Make astro a peerDependency of integrations

    This marks astro as a peerDependency of several packages that are already getting major version bumps. This is so we can more properly track the dependency between them and what version of Astro they are being used with.

Patch Changes

0.12.2-beta.1

Patch Changes

0.12.2-beta.0

Patch Changes

1.0.0-beta.2

Major Changes

  • #5842 c4b0cb8bf Thanks @natemoo-re! - Breaking Change: client assets are built to an _astro directory in the build output directory. Previously these were built to various locations, including assets/, chunks/ and the root of build output.

    You can control this location with the new build configuration option named assets.

Minor Changes

  • #5806 7572f7402 Thanks @matthewp! - Make astro a peerDependency of integrations

    This marks astro as a peerDependency of several packages that are already getting major version bumps. This is so we can more properly track the dependency between them and what version of Astro they are being used with.

Patch Changes

0.13.0-beta.0

Minor Changes

0.12.1

Patch Changes

0.12.0

Minor Changes

0.11.6

Patch Changes

0.11.5

Patch Changes

0.11.4

Patch Changes

0.11.3

Patch Changes

0.11.2

Patch Changes

0.11.1

Patch Changes

  • #5260 37d664e26 Thanks @tony-sull! - Fixes a bug where the web-streams-polyfill dependency would not be installed with the --production flag

0.11.0

Minor Changes

  • #5180 b77200f42 Thanks @tony-sull! - Removes the content-visibility: auto styling added by the <Picture /> and <Image /> components.

    Why: The content-visibility style is rarely needed for an <img> and can actually break certain layouts.

    Migration: Do images in your layout actually depend on content-visibility? No problem! You can add these styles where needed in your own component styles.

  • #5038 ed2dfdae5 Thanks @emmanuelchucks! - HTML attributes included on the <Picture /> component are now passed down to the underlying <img /> element.

    Why?

    • when styling a <picture> the class and style attributes belong on the <img> itself
    • <picture> elements should not actually provide any aria- attributes
    • width and height can be added to the <img> to help prevent layout shift

0.10.0

Minor Changes

  • #5056 e55af8a23 Thanks @matthewp! - # New build configuration

    The ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for server (the server code for SSR), client (your client-side JavaScript and assets), and serverEntry (the name of the entrypoint server module). Here are the defaults:

    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
      output: 'server',
      build: {
        server: './dist/server/',
        client: './dist/client/',
        serverEntry: 'entry.mjs',
      },
    });
    

    These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site).

    Integration hook change

    The integration hook astro:build:start includes a param buildConfig which includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the new build.config options. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead:

    export default function myIntegration() {
      return {
        name: 'my-integration',
        hooks: {
          'astro:config:setup': ({ updateConfig }) => {
            updateConfig({
              build: {
                server: '...',
              },
            });
          },
        },
      };
    }
    

Patch Changes

0.9.3

Patch Changes

0.9.2

Patch Changes

  • #4997 a2b66c754 Thanks @panwauu! - Fixes a bug that lost query parameters for remote images in the <Picture /> component

0.9.1

Patch Changes

0.9.0

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

0.8.1

Patch Changes

0.8.0

Minor Changes

  • #4738 fad3867ad Thanks @tony-sull! - Adds a new built-in image service based on web assembly libraries 🥁 web container support!

    Migration: Happy with the previous image service based on sharp? No problem! Install sharp in your project and update your Astro config to match.

    npm install sharp
    
    ---
    import image from '@astrojs/image';
    
    export default {
      // ...
      integrations: [
        image({
          serviceEntryPoint: '@astrojs/image/sharp',
        }),
      ],
    };
    ---
    

Patch Changes

  • #4797 944d24e9e Thanks @smeevil! - Do not pass width and height to the img element when wrapped in a picture element

0.7.1

Patch Changes

0.7.0

Minor Changes

0.6.1

Patch Changes

  • #4678 4c05c65a3 Thanks @tony-sull! - Updates the integration to build all optimized images to dist/assets during SSG builds

0.6.0

Minor Changes

  • #4642 e4348a4eb Thanks @beeb! - Added a background option to specify a background color to replace transparent pixels (alpha layer).

Patch Changes

0.5.1

Patch Changes

0.5.0

Minor Changes

Patch Changes

0.4.0

Minor Changes

  • #4482 00c605ce3 Thanks @tony-sull! - <Image /> and <Picture /> now support using images in the /public directory 🎉

    • Moving handling of local image files into the Vite plugin
    • Optimized image files are now built to /dist with hashes provided by Vite, removing the need for a /dist/_image directory
    • Removes three npm dependencies: etag, slash, and tiny-glob
    • Replaces mrmime with the mime package already used by Astro's SSR server
    • Simplifies the injected _image route to work for both dev and build
    • Adds a new test suite for using images with @astrojs/mdx - including optimizing images straight from /public

0.3.7

Patch Changes

0.3.6

Patch Changes

  • #4338 579e2daf8 Thanks @tony-sull! - When using remote images in SSG builds, query parameters from the original image source should be stripped from final build output

0.3.5

Patch Changes

  • #4342 c4af8723b Thanks @tony-sull! - The integration now includes a logger to better track progress in SSG builds. Use the new logLevel: "debug" integration option to see detailed logs of every image transformation built in your project.

0.3.4

Patch Changes

0.3.3

Patch Changes

0.3.2

Patch Changes

0.3.1

Patch Changes

0.3.0

Minor Changes

  • #4045 a397b981f Thanks @tony-sull! - Big improvements to the TypeScript and Language Tools support for @astrojs/image 🎉

0.2.0

Minor Changes

  • #4015 6fd161d76 Thanks @matthewp! - New output configuration option

    This change introduces a new "output target" configuration option (output). Setting the output target lets you decide the format of your final build, either:

    • "static" (default): A static site. Your final build will be a collection of static assets (HTML, CSS, JS) that you can deploy to any static site host.
    • "server": A dynamic server application. Your final build will be an application that will run in a hosted server environment, generating HTML dynamically for different requests.

    If output is omitted from your config, the default value "static" will be used.

    When using the "server" output target, you must also include a runtime adapter via the adapter configuration. An adapter will adapt your final build to run on the deployed platform of your choice (Netlify, Vercel, Node.js, Deno, etc).

    To migrate: No action is required for most users. If you currently define an adapter, you will need to also add output: 'server' to your config file to make it explicit that you are building a server. Here is an example of what that change would look like for someone deploying to Netlify:

    import { defineConfig } from 'astro/config';
    import netlify from '@astrojs/netlify/functions';
    
    export default defineConfig({
      adapter: netlify(),
    + output: 'server',
    });
    
  • #4013 ef9345767 Thanks @tony-sull! - - Fixes two bugs that were blocking SSR support when deployed to a hosting service
    • The built-in sharp service now automatically rotates images based on EXIF data

Patch Changes

0.1.3

Patch Changes

  • #3965 299b4afca Thanks @tony-sull! - Adding a unique hash to remote images built for SSG to ensure unique URLs are always de-duplicated

0.1.2

Patch Changes

0.1.1

Patch Changes

0.1.0

Minor Changes

  • #3866 89d76753 Thanks @tony-sull! - The new <Picture /> component adds art direction support for building responsive images with multiple sizes and file types 🎉

Patch Changes

0.0.4

Patch Changes

  • #3812 5ccccace Thanks @tony-sull! - - Updates how the <Image /> component is exported to support older versions of Astro
    • Adds an example of using the <Image /> component in markdown pages

0.0.3

Patch Changes

  • #3795 d143d24c Thanks @tony-sull! - Automatically adds the required vite.optimizeDeps config for sharp. Also ensures that only whole numbers are passed to sharp's resize transform

0.0.2

Patch Changes