struct PartialSvgImage: HtmlProducer { let imagePath: String let altText: String? let x: Int let y: Int let width: Int let height: Int private var aspectRatio: Double { guard height > 1 else { return 1 } return Double(width) / Double(height) } private var imageAltText: String { guard let altText else { return "" } return " alt='\(altText.htmlEscaped())'" } func populate(_ result: inout String) { result += "" result += "" result += "" } }