-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Labels
buildRelated to the build systemRelated to the build system
Description
Is your feature request related to a problem? Please describe.
When using 
, height
/ width
attributes are not set and browsers cannot avoid layout shifts caused by the image.
For example, when clicking the non-inherit
badge on the right side of each header on https://deploy-preview-20471--vite-docs-main.netlify.app/config/dep-optimization-options.html, the image above the link is shown in the viewport after the image is loaded.
Describe the solution you'd like
Vitepress to generate height
/ width
attributes for the images.
Describe alternatives you've considered
Add it manually by writing {height=100 width=200}
or {style="aspect-ratio:2; width:100%"}
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the docs.
- Read the Contributing Guidelines.
- Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
Metadata
Metadata
Assignees
Labels
buildRelated to the build systemRelated to the build system