//Delete Image from Notification
    if lentItems.imageURL == nil {
        //no image to delete
    } else {
        let fileManager = FileManager.default
        do {
            try fileManager.removeItem(atPath: lentItems.imageURL!)
        } catch {
            print("Could not delete Image: \(error)")
        }
    }
    // Create a URL
    let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first
    let imageURL = documentsURL?.appendingPathComponent("\(String(describing: title)).png")


    // save image to URL
    if thumbnailData == nil {
        print("No Picture")
    } else {
        let notificationImage = UIImage(data: thumbnailData as! Data) // or wherever you have your UIImage
        do {
            try UIImagePNGRepresentation(notificationImage!)?.write(to: notificationImageURL!)                    
        } catch {
            print("Couldnt save image" )
        }
    }