0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

chore: clarify wording of responsive image props

This commit is contained in:
Matt Kane 2024-11-20 12:15:27 +00:00
parent c48916cc4e
commit b86c4d2fcd
2 changed files with 5 additions and 5 deletions

View file

@ -150,6 +150,7 @@ export async function getImage(
resolvedOptions.fetchpriority ??= 'auto';
}
delete resolvedOptions.priority;
delete resolvedOptions.densities;
}
const validatedOptions = service.validateOptions

View file

@ -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.
* - `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:
*
* - `densities`
* - `widths`
* - `sizes`
* 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.
*
* The `densities` attribute is not compatible with responsive images and will be ignored if set.
*/
responsiveImages?: boolean;