Markdown Image
About 255 words
Overview
Adds additional features for Markdown images.
Related plugin: @vuepress/plugin-markdown-image
Configuration
- Type:
false | MarkdownImagePluginOptions - Default:
false
The plugin does not enable any features by default; you need to enable them manually.
.vuepress/config.ts
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'
export default defineUserConfig({
theme: plumeTheme({
markdown: {
image: {
// Enable figure
// figure: true,
// Enable image lazy loading
// lazyload: true,
// Enable image marking
// mark: true,
// Enable image dimensions
// size: true,
}
},
}),
})For configuration entry priority information, please refer to Plugin Configuration Entry.
Configuration Options
figure
- Type:
boolean | MarkdownItFigureOptions - Default:
false - Details: Whether to render standalone images as a figure
lazyload
- Type:
boolean - Default:
false - Details: Whether to enable native image lazy loading
mark
- Type:
boolean | MarkdownItImgMarkOptions - Default:
false - Details: Whether to enable GFM image ID marking
size
- Type:
boolean - Default:
false - Details: Whether to enable image size support
obsidianSize
- Type:
boolean - Default:
false - Details: Whether to enable Obsidian image size support
legacySize
- Type:
boolean - Default:
false - Details: Deprecated Whether to enable legacy image size support
Difference from markdown.imageSize
The size / obsidianSize on this page are syntax-level support, used to write image dimensions like . If you want to automatically fill in the width / height attributes of images during the build stage (to solve layout jitter), use imageSize in the markdown configuration instead.
