Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
153ca15
add reference entries to astro-assets.mdx
sarah11918 May 9, 2025
21652cc
responsive images own section
sarah11918 May 12, 2025
4d013f2
internally consistent links/content with eventual config reference
sarah11918 May 12, 2025
c67534c
big reorg of images guide, add responsive image content
sarah11918 May 20, 2025
27c0f8e
update links
sarah11918 May 22, 2025
67714f8
Merge branch 'main' into responsive-images-stable
sarah11918 May 22, 2025
5da7a9b
change some Astro component headings, waiting for link fallout
sarah11918 May 22, 2025
bb6c0ea
update description of Picture component
sarah11918 May 22, 2025
f7d41a1
update responsive image section heading and subsections
sarah11918 May 22, 2025
5cbc56a
updating config names for consistency on experimental flag page (not …
sarah11918 Jun 11, 2025
12ffa24
Apply suggestions from code review
ascorbic Jun 12, 2025
4fa1ceb
adds placeholder responsiveStyles as well as Since components
sarah11918 Jun 12, 2025
eb44c20
Merge branch 'main' into responsive-images-stable
sarah11918 Jun 12, 2025
eca5cf2
add redirect from experimental page to images guide
sarah11918 Jun 12, 2025
4f01775
removes experimental responsive images page and from sidebar nav
sarah11918 Jun 12, 2025
f88dfd2
removes responsive images translations (fr, ko. zh-cn)
sarah11918 Jun 12, 2025
c390942
document the priority option in the astro-assets reference page
sarah11918 Jun 12, 2025
ba0004f
fix anchor/absolute links
sarah11918 Jun 17, 2025
1f9e2f5
Yan nits
sarah11918 Jun 17, 2025
6c0096e
Yan and Sarah nits
sarah11918 Jun 17, 2025
35c64df
Armand fixing case in `image.*` properties
sarah11918 Jun 19, 2025
7efcfb3
typo locaged in my text...
sarah11918 Jun 19, 2025
90e934f
Merge branch 'main' into responsive-images-stable
sarah11918 Jun 19, 2025
5e7e549
Merge branch '5.10.0' into responsive-images-stable
sarah11918 Jun 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion astro.sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ export const sidebar = [
group('reference.experimental', {
items: [
'reference/experimental-flags',
'reference/experimental-flags/responsive-images',
'reference/experimental-flags/fonts',
'reference/experimental-flags/client-prerender',
'reference/experimental-flags/content-intellisense',
Expand Down
2 changes: 2 additions & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
/:lang/reference/experimental-flags/sessions/ /:lang/guides/sessions/
/:lang/reference/experimental-flags/svg/ /:lang/guides/images/
/:lang/reference/experimental-flags/serialized-configuration/ /:lang/reference/modules/astro-config/
/:lang/reference/experimental-flags/responsive-images/ /:lang/guides/images/


# Very old docs site redirects
# Once upon a time these URLs existed, so we try to keep them meaning something.
Expand Down
492 changes: 309 additions & 183 deletions src/content/docs/en/guides/images.mdx

Large diffs are not rendered by default.

53 changes: 40 additions & 13 deletions src/content/docs/en/reference/configuration-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1133,53 +1133,80 @@ You can use wildcards to define the permitted `hostname` and `pathname` values a
- End with '/**' to allow all sub-routes ('startsWith').
- End with '/*' to allow only one level of sub-route.

### image.experimentalLayout
### image.responsiveStyles

<p>

**Type:** `boolean`<br />
**Default:** `false`
<Since v="5.10.0" />
</p>

Whether to automatically add global styles for responsive images. You should enable this option unless you are styling the images yourself.

This option is only used when `layout` is set to `constrained`, `full-width`, or `fixed` using the configuration or the `layout` prop on the image component.

See [the Images guide](/en/guides/images/#responsive-image-styles) for more information.


### image.layout

<p>

**Type:** `ImageLayout`<br />
**Default:** `undefined`
<Since v="5.10.0" />
</p>

The default layout type for responsive images. Can be overridden by the `layout` prop on the image component.
Requires the `experimental.responsiveImages` flag to be enabled.
The default `layout` type for responsive images. Can be overridden by the `layout` prop on an individual image component.

- `constrained` - The image will scale to fit the container, maintaining its aspect ratio, but will not exceed the specified dimensions.
- `fixed` - The image will maintain its original dimensions.
- `full-width` - The image will scale to fit the container, maintaining its aspect ratio.

### image.experimentalObjectFit
See [the `layout` component property](/en/reference/modules/astro-assets/#layout) for more details.

### image.objectFit

<p>

**Type:** `ImageFit`<br />
**Default:** `"cover"`
<Since v="5.10.0" />
</p>

The default object-fit value for responsive images. Can be overridden by the `fit` prop on the image component.
Requires the `experimental.responsiveImages` flag to be enabled.
The default [`object-fit` CSS property value](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) for responsive images. Can be overridden by the `fit` prop on an individual image component.

See [the `fit` component property](/en/reference/modules/astro-assets/#fit) for more details.

### image.experimentalObjectPosition

### image.objectPosition

<p>

**Type:** `string`<br />
**Default:** `"center"`
<Since v="5.10.0" />
</p>

The default object-position value for responsive images. Can be overridden by the `position` prop on the image component.
Requires the `experimental.responsiveImages` flag to be enabled.
The default [`object-position` CSS property value](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) for responsive images. Can be overridden by the `position` prop on an individual image component.

See [the `position` component property](/en/reference/modules/astro-assets/#position) for more details.

### image.experimentalBreakpoints
### image.breakpoints

<p>

**Type:** `Array<number>`<br />
**Default:** `[640, 750, 828, 1080, 1280, 1668, 2048, 2560] | [640, 750, 828, 960, 1080, 1280, 1668, 1920, 2048, 2560, 3200, 3840, 4480, 5120, 6016]`
<Since v="5.10.0" />
</p>

The breakpoints used to generate responsive images. Requires the `experimental.responsiveImages` flag to be enabled. The full list is not normally used,
but is filtered according to the source and output size. The defaults used depend on whether a local or remote image service is used. For remote services
the more comprehensive list is used, because only the required sizes are generated. For local services, the list is shorter to reduce the number of images generated.
The breakpoints used to generate responsive images.

The full list of breakpoints is not normally used but instead is filtered according to the source and output size. The defaults used depend on whether a local or remote image service is used.

For remote services, more breakpoints are included because only the required sizes will actually be generated. For local services, the list of breakpoints is shorter to reduce the number of images generated.

### image.experimentalDefaultStyles

Expand Down
178 changes: 0 additions & 178 deletions src/content/docs/en/reference/experimental-flags/responsive-images.mdx

This file was deleted.

Loading