HtmlToMarkdown. ImageMetadata
(html_to_markdown v3.5.0-rc.1)
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((800, 600)),
image_type: ImageType::External,
attributes: Default::default(),
};
assert_eq!(img.image_type, ImageType::External);