mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
chore: clarify wording of responsive image props (#12482)
This commit is contained in:
parent
c48916cc4e
commit
e1a5e65ad7
2 changed files with 5 additions and 5 deletions
|
@ -150,6 +150,7 @@ export async function getImage(
|
||||||
resolvedOptions.fetchpriority ??= 'auto';
|
resolvedOptions.fetchpriority ??= 'auto';
|
||||||
}
|
}
|
||||||
delete resolvedOptions.priority;
|
delete resolvedOptions.priority;
|
||||||
|
delete resolvedOptions.densities;
|
||||||
}
|
}
|
||||||
|
|
||||||
const validatedOptions = service.validateOptions
|
const validatedOptions = service.validateOptions
|
||||||
|
|
|
@ -1899,11 +1899,10 @@ export interface ViteUserConfig extends OriginalViteUserConfig {
|
||||||
* - `position`: Defines the position of the image crop if the aspect ratio is changed. Values match those of CSS `object-position`. Defaults to `center`, or the value of `image.experimentalObjectPosition` if set.
|
* - `position`: Defines the position of the image crop if the aspect ratio is changed. Values match those of CSS `object-position`. Defaults to `center`, or the value of `image.experimentalObjectPosition` if set.
|
||||||
* - `priority`: If set, eagerly loads the image. Otherwise images will be lazy-loaded. Use this for your largest above-the-fold image. Defaults to `false`.
|
* - `priority`: If set, eagerly loads the image. Otherwise images will be lazy-loaded. Use this for your largest above-the-fold image. Defaults to `false`.
|
||||||
*
|
*
|
||||||
* The following `<Image />` component properties should not be used with responsive images as these are automatically generated:
|
* The `widths` and `sizes` attributes are automatically generated based on the image's dimensions and the layout type, and in most cases should not be set manually. The generated `sizes` attribute for `responsive` and `full-width` images
|
||||||
*
|
* is based on the assumption that the image is displayed at close to the full width of the screen when the viewport is smaller than the image's width. If it is significantly different (e.g. if it's in a multi-column layout on small screens) you may need to adjust the `sizes` attribute manually for best results.
|
||||||
* - `densities`
|
*
|
||||||
* - `widths`
|
* The `densities` attribute is not compatible with responsive images and will be ignored if set.
|
||||||
* - `sizes`
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
responsiveImages?: boolean;
|
responsiveImages?: boolean;
|
||||||
|
|
Loading…
Reference in a new issue