HtmlToMarkdown. ImageMetadata
(html_to_markdown v3.11.4)
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);
Summary
Types
@type t() :: %HtmlToMarkdown.ImageMetadata{ alt: String.t() | nil, attributes: map(), dimensions: HtmlToMarkdown.ImageDimensions.t() | nil, image_type: HtmlToMarkdown.ImageType.t(), src: String.t() | nil, title: String.t() | nil }
Image metadata with source and dimensions.