         self.draw(image: image, transform: transform, using: .png, properties: [:])
     }
     
-    public func draw(image: ImageRep, transform: SDTransform, using storageType: ImageRep.MediaType, properties: [ImageRep.PropertyKey : Any]) {
+    public func draw(image: ImageRep, transform: SDTransform, using storageType: MediaType, properties: [ImageRep.PropertyKey : Any]) {
         self._draw(image: image, transform: transform, using: storageType, properties: properties)
     }
     

        return SVGContext.ImageTableKey(self)
    }
    
    fileprivate func encode(using storageType: ImageRep.MediaType, properties: [ImageRep.PropertyKey : Any]) -> String? {
        guard let mediaType = storageType.media_type_string else { return nil }
        guard let data = self.representation(using: storageType, properties: properties) else { return nil }
        return "data:\(mediaType);base64," + data.base64EncodedString()

    
    var imageTableKey: SVGContext.ImageTableKey { get }
    
    func encode(using storageType: MediaType, properties: [ImageRep.PropertyKey : Any]) -> String?
}

extension MediaType {
    
    fileprivate var media_type_string: String? {
        switch self {
