Skip to content

Commit

Permalink
Update image error messages (withastro#12331)
Browse files Browse the repository at this point in the history
Co-authored-by: Atharva <[email protected]>
  • Loading branch information
sarah11918 and at-the-vr authored Oct 29, 2024
1 parent feb87c2 commit 413503e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/astro/src/core/errors/errors-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ export const PageNumberParamNotFound = {
* @docs
* @see
* - [Images](https://docs.astro.build/en/guides/images/)
* - [Image component](https://docs.astro.build/en/guides/images/#image--astroassets)
* - [Image component#alt](https://docs.astro.build/en/guides/images/#alt-required)
* - [Image component](https://docs.astro.build/en/reference/modules/astro-assets/#image-)
* - [Image component#alt](https://docs.astro.build/en/reference/modules/astro-assets/#alt-required)
* @description
* The `alt` property allows you to provide descriptive alt text to users of screen readers and other assistive technologies. In order to ensure your images are accessible, the `Image` component requires that an `alt` be specified.
*
Expand Down Expand Up @@ -496,9 +496,9 @@ export const InvalidImageService = {
* Missing width and height attributes for `IMAGE_URL`. When using remote images, both dimensions are required in order to avoid cumulative layout shift (CLS).
* @see
* - [Images](https://docs.astro.build/en/guides/images/)
* - [Image component#width-and-height-required](https://docs.astro.build/en/guides/images/#width-and-height-required-for-images-in-public)
* - [Image component#width-and-height-required](https://docs.astro.build/en/reference/modules/astro-assets/#width-and-height-required-for-images-in-public)
* @description
* For remote images, `width` and `height` cannot automatically be inferred from the original file. To avoid cumulative layout shift (CLS), either specify these two properties, or set [`inferSize`](https://docs.astro.build/en/guides/images/#infersize) to `true` to fetch a remote image's original dimensions.
* For remote images, `width` and `height` cannot automatically be inferred from the original file. To avoid cumulative layout shift (CLS), either specify these two properties, or set [`inferSize`](https://docs.astro.build/en/reference/modules/astro-assets/#infersize) to `true` to fetch a remote image's original dimensions.
*
* If your image is inside your `src` folder, you probably meant to import it instead. See [the Imports guide for more information](https://docs.astro.build/en/guides/imports/#other-assets).
*/
Expand Down Expand Up @@ -939,7 +939,6 @@ export const InvalidDynamicRoute = {
* @docs
* @see
* - [Default Image Service](https://docs.astro.build/en/guides/images/#default-image-service)
* - [Image Component](https://docs.astro.build/en/guides/images/#image--astroassets)
* - [Image Services API](https://docs.astro.build/en/reference/image-service-reference/)
* @description
* Sharp is the default image service used for `astro:assets`. When using a [strict package manager](https://pnpm.io/pnpm-vs-npm#npms-flat-tree) like pnpm, Sharp must be installed manually into your project in order to use image processing.
Expand Down

0 comments on commit 413503e

Please sign in to comment.