Skip to content

Commit

Permalink
fix(common): update size error to mention 'fill' mode
Browse files Browse the repository at this point in the history
The current error that is thrown when the "width" or
"height" attributes is missing doesn't mention that
"fill" mode is another option. This commit updates
the error with that option.
  • Loading branch information
kara committed Oct 18, 2022
1 parent 0d65e1d commit 8b87586
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -830,7 +830,8 @@ function assertNonEmptyWidthAndHeight(dir: NgOptimizedImage) {
`${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +
`are missing: ${missingAttributes.map(attr => `"${attr}"`).join(', ')}. ` +
`Including "width" and "height" attributes will prevent image-related layout shifts. ` +
`To fix this, include "width" and "height" attributes on the image tag.`);
`To fix this, include "width" and "height" attributes on the image tag or turn on ` +
`"fill" mode with the \`fill\` attribute.`);
}
}

Expand Down

0 comments on commit 8b87586

Please sign in to comment.