                             }
                             
                             if  let image = image
-                                , self.imageExportPreset == .compatible
+                                , self.configuration.imageExportPreset == .compatible
                                 , self.isHEIC(with: imageData) {
                                 imageData = self.imageToJPEG(with: image) ?? imageData
                             }

}

/*
 This exporter is able to export DKAsset (PHAsset) from album (or iCloud) to app's tmp directory
 and it will automatically cleanup when appropriate.
 */
@objc
public class DKImageAssetExporter: DKBaseManager {
    
    static public let sharedInstance = DKImageAssetExporter()
    
    @objc public var imageExportPreset = DKImageExportPresent.compatible
    

            }
            
            if asset.type == .photo {
                fileName = fileName + String(self.configuration.imageExportPreset.rawValue)
            } else {
                fileName = fileName + self.configuration.videoExportPreset + self.configuration.avOutputFileType.rawValue
            }
        } else {
            fileName = "\(Date().timeIntervalSince1970)"
        }
        
        if !FileManager.default.fileExists(atPath: self.configuration.exportDirectory.path) {
            try? FileManager.default.createDirectory(at: self.configuration.exportDirectory, withIntermediateDirectories: true, attributes: nil)
        }
        
        DKImageAssetDiskPurger.sharedInstance.addDirectory(self.configuration.exportDirectory)
        
        return self.configuration.exportDirectory.appendingPathComponent(fileName)
    }
    
    static let ioQueue = DispatchQueue(label: "DKPhotoImagePreviewVC.ioQueue")
