-
#6494
a13e9d7e3Thanks @Yan-Thomas! - Consistency improvements to several package descriptions -
Updated dependencies [
acf78c5e2,04e624d06,cc90d7219,a9a6ae298,6a7cf0712,bfd67ea74,f6eddffa0,c63874090,d637d1ea5,637f9bc72,77a046e88]:- astro@2.1.3
- #6213
afbbc4d5bThanks @Princesseuh! - Updated compilation settings to disable downlevelling for Node 14
-
#6421
e58a92527Thanks @vtavernier! - Handle missing trailing slash in processStaticImage -
Updated dependencies [
fec583909,b087b83fe,694918a56,a20610609,a4a74ab70,75921b3cd,afbbc4d5b]:- astro@2.1.0
-
#6347
504c7bacbThanks @natemoo-re! - Fix internalgetSetCookieusage forundici@5.20.x -
Updated dependencies [
5e26bc891,a156ecbb7,ccd72e6bb,504c7bacb,63dda6ded,f91a7f376]:- astro@2.0.15
-
#6142
9fdecb560Thanks @wulinsheng123! - Improve type definitions (backgroundshould be optional) -
#6157
460f9e732Thanks @chasm! - Fix duplicatealtattribute on Picture component. -
Updated dependencies [
f6fc662c3,592386b75,1b591a143,bf8d7366a,ec38a8921,f20a85b64,9f22ac3d0,cee70f5c6,ac7fb04d6,d1f5611fe,2189170be,32abe49bd]:- astro@2.0.7
- #5932
b3e65991fThanks @rasendubi! - Allow images from outside srcDir
-
#5894
ca91976edThanks @ralacerda! -getPicture()return object with the correct image type -
Updated dependencies [
9793f19ec,f91615f5c,2fb72c887]:- astro@2.0.5
-
#5478
1c7eef308Thanks @nemo0! - Update READMEs for consistency -
#6008
9c298aa5aThanks @jasikpark! - Updated error message for missingwidthsprop to provide an example -
#6008
9c298aa5aThanks @jasikpark! - Allow passingundefinedto TransformOptions, this is a types fix for users withexactOptionalTypesenabled in their tsconfig -
Updated dependencies [
b4432cd6b,98a4a914b,071e1dee7,322e059d0,b994f6f35,12c68343c]:- astro@2.0.3
-
#5584
9963c6e4d& #5842c4b0cb8bfThanks @wulinsheng123 and @natemoo-re! - Breaking Change: client assets are built to an_astrodirectory in the build output directory. Previously these were built to various locations, includingassets/,chunks/and the root of build output.You can control this location with the new
buildconfiguration option namedassets. -
#5707
5eba34fccThanks @bluwy! - Removeastro:build:startbackwards compatibility code -
#5806
7572f7402Thanks @matthewp! - Make astro a peerDependency of integrationsThis marks
astroas a peerDependency of several packages that are already gettingmajorversion bumps. This is so we can more properly track the dependency between them and what version of Astro they are being used with.
-
#5930
46ecd5de3Thanks @h3y6e! - Update magic-string from 0.25.9 to 0.27.0 -
#5788
006405d33Thanks @MoustaphaDev! - - Refactor types to support props auto-completion for theImageandPicturecomponents.- Pass previously missing
altprop to thegetPicturefunction
- Pass previously missing
-
#5871
1bd42c6b2Thanks @Princesseuh! - Fix the integration failing to work properly on Node 18+ -
#5888
35b26f377Thanks @Princesseuh! - Fix crash on Netlify Functions due toimport.meta.url -
Updated dependencies [
93e633922,16dc36a87,01f3f463b,e2019be6f,05caf445d,49ab4f231,a342a486c,8fb28648f,1f92d64ea,c2180746b,ae8a012a7,cf2de5422,ce5c5dbd4,ec09bb664,665a2c222,259a539d7,f7aa1ec25,4987d6f44,304823811,302e0ef8f,55cea0a9d,dd56c1941,9963c6e4d,be901dc98,f6cf92b48,e818cc046,8c100a6fe,116d8835c,840412128,1f49cddf9,7325df412,16c7d0bfd,a9c292026,2a5786419,4a1cabfe6,a8d3e7924,fa8c131f8,64b8082e7,c4b0cb8bf,23dc9ea96,63a6ceb38,a3a7fc929,52209ca2a,5fd9208d4,5eba34fcc,899214298,3a00ecb3e,5eba34fcc,2303f9514,1ca81c16b,b66d7195c]:- astro@2.0.0
-
#5930
46ecd5de3Thanks @h3y6e! - Update magic-string from 0.25.9 to 0.27.0 -
Updated dependencies [
4987d6f44,304823811,7325df412,a8d3e7924,5fd9208d4]:- astro@2.0.0-beta.4
-
#5788
006405d33Thanks @MoustaphaDev! - - Refactor types to support props auto-completion for theImageandPicturecomponents.- Pass previously missing
altprop to thegetPicturefunction
- Pass previously missing
-
#5871
1bd42c6b2Thanks @Princesseuh! - Fix the integration failing to work properly on Node 18+ -
#5888
35b26f377Thanks @Princesseuh! - Fix crash on Netlify Functions due toimport.meta.url -
Updated dependencies [
16dc36a87,05caf445d,a342a486c,ce5c5dbd4,be901dc98,e818cc046,8c100a6fe,64b8082e7,899214298,3a00ecb3e,1ca81c16b,b66d7195c]:- astro@2.0.0-beta.3
-
#5842
c4b0cb8bfThanks @natemoo-re! - Breaking Change: client assets are built to an_astrodirectory in the build output directory. Previously these were built to various locations, includingassets/,chunks/and the root of build output.You can control this location with the new
buildconfiguration option namedassets.
-
#5806
7572f7402Thanks @matthewp! - Make astro a peerDependency of integrationsThis marks
astroas a peerDependency of several packages that are already gettingmajorversion bumps. This is so we can more properly track the dependency between them and what version of Astro they are being used with.
- Updated dependencies [
01f3f463b,1f92d64ea,c2180746b,ae8a012a7,cf2de5422,ec09bb664,665a2c222,f7aa1ec25,302e0ef8f,840412128,1f49cddf9,4a1cabfe6,c4b0cb8bf,23dc9ea96,63a6ceb38,52209ca2a,2303f9514]:- astro@2.0.0-beta.2
- #5474
299ae9bb6Thanks @wulinsheng123! - added a warning if the image was GIF
- #5393
e2fb0c4ffThanks @wulinsheng123! - Log error if failed to fetch remote image
- #5260
37d664e26Thanks @tony-sull! - Fixes a bug where theweb-streams-polyfilldependency would not be installed with the--productionflag
-
#5180
b77200f42Thanks @tony-sull! - Removes thecontent-visibility: autostyling 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
ed2dfdae5Thanks @emmanuelchucks! - HTML attributes included on the<Picture />component are now passed down to the underlying<img />element.Why?
- when styling a
<picture>theclassandstyleattributes belong on the<img>itself <picture>elements should not actually provide anyaria-attributeswidthandheightcan be added to the<img>to help prevent layout shift
- when styling a
-
#5056
e55af8a23Thanks @matthewp! - # New build configurationThe 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), andserverEntry(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).
The integration hook
astro:build:startincludes a parambuildConfigwhich 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 newbuild.configoptions. 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: '...', }, }); }, }, }; }
-
#5073
93f72f90bThanks @bluwy! - Fix image external config in build -
#5072
3918787cbThanks @bluwy! - Support relative protocol image URL
-
#5021
062335dbfThanks @matthewp! - Fix remote images in SSG mode -
#5034
2d9d42216Thanks @bluwy! - Support strict dependency install
- #4997
a2b66c754Thanks @panwauu! - Fixes a bug that lost query parameters for remote images in the<Picture />component
- #4944
a8f1a91e7Thanks @scottaw66! - Moves http-cache-semantics from dev dependency to dependency
-
#4909
989298961Thanks @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.
- #4933
64a1d712eThanks @tony-sull! - Fixes a bug in dev when<Image />is used for a local image with no transformations
-
#4906
ec55745aeThanks @tony-sull! - Updates the default image service to use format-specific quality defaults -
#4842
812658ad2Thanks @bluwy! - Specify sharp as optional peer dependency -
#4842
812658ad2Thanks @bluwy! - Add missing dependencies, support strict dependency installation (e.g. pnpm)
-
#4738
fad3867adThanks @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! Installsharpin 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', }), ], }; ---
- #4797
944d24e9eThanks @smeevil! - Do not pass width and height to the img element when wrapped in a picture element
- #4800
ea37de86eThanks @obennaci! - Prevent background flattening on formats supporting transparency
- #4678
4c05c65a3Thanks @tony-sull! - Updates the integration to build all optimized images todist/assetsduring SSG builds
- #4642
e4348a4ebThanks @beeb! - Added abackgroundoption to specify a background color to replace transparent pixels (alpha layer).
- #4649
db70afdcdThanks @tony-sull! - Fixes a bug related to filenames for remote images in SSG builds
- #4593
56f83be92Thanks @tony-sull! - Fixes a bug that broke support for local images with spaces in the filename
-
#4482
00c605ce3Thanks @tony-sull! -<Image />and<Picture />now support using images in the/publicdirectory π- Moving handling of local image files into the Vite plugin
- Optimized image files are now built to
/distwith hashes provided by Vite, removing the need for a/dist/_imagedirectory - Removes three npm dependencies:
etag,slash, andtiny-glob - Replaces
mrmimewith themimepackage already used by Astro's SSR server - Simplifies the injected
_imageroute to work for bothdevandbuild - Adds a new test suite for using images with
@astrojs/mdx- including optimizing images straight from/public
- #4534
b8a80bc42Thanks @Princesseuh! - Fix import.meta.env not being available when using the image integration's types
- #4338
579e2daf8Thanks @tony-sull! - When using remote images in SSG builds, query parameters from the original image source should be stripped from final build output
- #4342
c4af8723bThanks @tony-sull! - The integration now includes a logger to better track progress in SSG builds. Use the newlogLevel: "debug"integration option to see detailed logs of every image transformation built in your project.
- #4279
42fd6936cThanks @FredKSchott! - Add better warnings if the integration was not properly configured.
- #4221
92aa6a75eThanks @alex-drocks! - README update
- #4140
4678a3f35Thanks @jackmerrill! - Added support for GIF to Animated WEBP images
- #4173
581120818Thanks @tony-sull! - Fixes a bug related to local image files in SSR builds on Windows
- #4147
c039ea93aThanks @crutchcorn! - Enable usage outside of vite contexts, such as the config file
- #4146
97cf0cd89Thanks @crutchcorn! - Export all "dist" files
- #4141
65f2d3b4bThanks @FredKSchott! - fix windows "bad package export" error
- #4045
a397b981fThanks @tony-sull! - Big improvements to the TypeScript and Language Tools support for@astrojs/imageπ
-
#4015
6fd161d76Thanks @matthewp! - Newoutputconfiguration optionThis 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
outputis 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 theadapterconfiguration. 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 addoutput: '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
ef9345767Thanks @tony-sull! - - Fixes two bugs that were blocking SSR support when deployed to a hosting service- The built-in
sharpservice now automatically rotates images based on EXIF data
- The built-in
- #3961
d73c04a9eThanks @tony-sull! - Updates the component to pass thealtattribute down to theelement
- #4048
e60d6d9c1Thanks @tony-sull! - Removes Node'sfileURLToPathdependency in the production SSR endpoint
- #4004
ef9c4152bThanks @sarah11918! - [READMEs] removed "experimental" from astro add instructions
- #3980
eaf187f2cThanks @tony-sull! - Fixing TypeScript definition exports for image components
- #3957
2a7dd040eThanks @tony-sull! - Improves theastro devexperience when using a third-party hosted image service
- #3965
299b4afcaThanks @tony-sull! - Adding a unique hash to remote images built for SSG to ensure unique URLs are always de-duplicated
- #3876
f9614128Thanks @tony-sull! - Bug: Updating the component to default to async image decoding
- #3866
89d76753Thanks @tony-sull! - The new<Picture />component adds art direction support for building responsive images with multiple sizes and file types π
- #3854
b012ee55Thanks @bholmesdev! - [astro add] Support adapters and third party packages
- #3869
0aaef1c4Thanks @tony-sull! - Bugfix: fixing a bug that broke builds in NPM workspaces
- #3812
5ccccaceThanks @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
- Adds an example of using the
- #3795
d143d24cThanks @tony-sull! - Automatically adds the requiredvite.optimizeDepsconfig forsharp. Also ensures that only whole numbers are passed to sharp's resize transform
- #3788
f4943e0fThanks @tony-sull! - Initial release! π