Open takenspc opened 4 years ago
// .vuepress/config.js
module.exports = {
markdown: {
extendMarkdown: md => {
md.use(require('markdown-it-imsize'))
}
}
}
![Architecture of VuePress](/architecture.png =1774x2334)
to
<img src="/architecture.png" alt="Architecture of VuePress" width="1774" height="2334">
or use vuepress-plugin-img-lazy
Bug report
Steps to reproduce
The content below
<img>
which doesn't havewidth
andheight
can move suddenly. This can be distracting to users.https://web.dev/optimize-cls/
To avoid this problem, vuepress could add
width
andheight
to<img>
s.What is expected?
Vuepress generates
<img>
elements withwidth
andheight
attributes.https://vuepress.vuejs.org/plugin/ (Markdown)
What is actually happening?
Vuepress generates
<img>
elements withoutwidth
andheight
attributes.https://vuepress.vuejs.org/plugin/ (Markdown)
Other relevant information
I think image-size package can be used for this.