HtmlToMarkdown. ImageMetadata
(html_to_markdown v3.6.0-rc.20)
Copy Markdown
Image metadata with source and dimensions.
Captures <img> elements and inline <svg> elements with metadata
for image analysis and optimization.
Examples
let img = ImageMetadata {
src: "https://example.com/image.jpg".to_string(),
alt: Some("An example image".to_string()),
title: Some("Example".to_string()),
dimensions: Some(ImageDimensions { width: 800, height: 600 }),
image_type: ImageType::External,
attributes: Default::default(),
};
assert_eq!(img.image_type, ImageType::External);