import { PluginWithOptions } from 'markdown-it'; declare const CACHE_DIR = "node_modules/markdown-it-image-size/.cache"; type Options = { /** * @description * Where to look for local images. * This is used to resolve relative paths. * Certain generators like Eleventy and VitePress provide the path to the Markdown file. * * @default "." */ publicDir?: string; /** * @description * Whether to cache the image dimensions. * Will only cache if the image dimensions are found. * * @default true */ cache?: boolean; /** * @description * Custom cache file name. * * **Note:** This is experimental and may not work as expected. * * @default "dimensions.json" */ _cacheFile?: string; /** * @description * If true, the width and height attributes will be overwritten if * they are already present. For instance, if the image is defined * with `![alt text](image.png =100x200)` and a plugin like * `@mdit/plugin-img-size` is used, the width and height attributes * will be overwritten with the actual dimensions of the image. * * @example * ```js * const MarkdownIt = require("markdown-it"); * const { markdownItImageSize } = require("markdown-it-image-size"); * const { imgSize } = require("@mdit/plugin-img-size"); * * const mdRenderer = MarkdownIt(); * mdRenderer * .use(imgSize) * .use(markdownItImageSize, { * overwriteAttrs: true, * }); * * const html = mdRenderer.render(`![alt text](/path/to/image.jpg =100x200)`); * console.log(html); * * // The attributes are overwritten with the correct dimensions (350x700). * //

alt text

* ``` * * @default false */ overwriteAttrs?: boolean; }; declare const markdownItImageSize: PluginWithOptions; export { CACHE_DIR, markdownItImageSize };