Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 0 deletions src/content/docs/en/reference/error-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The following reference is a complete list of the errors you may encounter while
- [**PrerenderDynamicEndpointPathCollide**](/en/reference/errors/prerender-dynamic-endpoint-path-collide/)<br/>Prerendered dynamic endpoint has path collision.
- [**ExpectedImage**](/en/reference/errors/expected-image/)<br/>Expected src to be an image.
- [**ExpectedImageOptions**](/en/reference/errors/expected-image-options/)<br/>Expected image options.
- [**IncompatibleDescriptorOptions**](/en/reference/errors/incompatible-descriptor-options/)<br/>Cannot set both `densities` and `widths`
- [**ImageNotFound**](/en/reference/errors/image-not-found/)<br/>Image not found.
- [**NoImageMetadata**](/en/reference/errors/no-image-metadata/)<br/>Could not process image metadata.
- [**MarkdownImageNotFound**](/en/reference/errors/markdown-image-not-found/)<br/>Image not found.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# NOTE: This file is auto-generated from 'scripts/error-docgen.mjs'
# Do not make edits to it directly, they will be overwritten.
# Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
# Translators, please remove this note and the <DontEditWarning/> component.

title: Cannot set both densities and widths
i18nReady: true
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
---
import DontEditWarning from '~/components/DontEditWarning.astro'

<DontEditWarning />


> **IncompatibleDescriptorOptions**: Only one of `densities` or `widths` can be specified. In most cases, you'll probably want to use only `widths` if you require specific widths.

## What went wrong?
Only one of `densities` or `widths` can be specified. Those attributes are used to construct a `srcset` attribute, which cannot have both `x` and `w` descriptors.

**See Also:**
- [Images](/en/guides/images/)