diff --git a/Packages/ComposeUI/Sources/ComposeUI/Controllers/AttachmentThumbnailController.swift b/Packages/ComposeUI/Sources/ComposeUI/Controllers/AttachmentThumbnailController.swift index c405fb2f..4c465b3a 100644 --- a/Packages/ComposeUI/Sources/ComposeUI/Controllers/AttachmentThumbnailController.swift +++ b/Packages/ComposeUI/Sources/ComposeUI/Controllers/AttachmentThumbnailController.swift @@ -95,19 +95,21 @@ class AttachmentThumbnailController: ViewController { self.gifController = GIFController(gifData: data) } else if type.conforms(to: .image), let image = UIImage(data: data) { - if fullSize { + // using prepareThumbnail on images from PHPicker results in extremely high memory usage, + // crashing share extension. see FB12186346 +// if fullSize { image.prepareForDisplay { prepared in DispatchQueue.main.async { - self.image = prepared + self.image = image } } - } else { - image.prepareThumbnail(of: CGSize(width: 80, height: 80)) { prepared in - DispatchQueue.main.async { - self.image = prepared - } - } - } +// } else { +// image.prepareThumbnail(of: CGSize(width: 80, height: 80)) { prepared in +// DispatchQueue.main.async { +// self.image = prepared +// } +// } +// } } } }