Loading images from `PHPickerResult` with `loadFileRepresentation` taking very long time

We are seeing how most of the images loaded from the PHPickerViewController with:

result.itemProvider.loadFileRepresentation(forTypeIdentifier: imageType.identifier)

take a fraction of a second to load. However, since a few weeks ago, we are seeing more a more images that take minutes, 10 minutes in some cases.

This images shouldn't be in iCloud, they are recently taken, the devices have enough free space and we are trying with good network conditions.

Are others out there experiencing the same? Any tips to prevent these long times?

Answered by Engineer in 803489022

You can use .current asset representation mode to speed up image loading (to avoid unnecessary transcoding if your app can support modern image formats like HEIF).

Assets recently taken on device may need to go through additional processing. To learn more about deferred processing, you can checkout: https://developer.apple.com/videos/play/wwdc2023/10105/

However, if you think deferred processing took longer than expected, please submit a Feedback with a sysdiagnose using the Feedback app, and let us know the Feedback ID. Thanks!

You can use .current asset representation mode to speed up image loading (to avoid unnecessary transcoding if your app can support modern image formats like HEIF).

Assets recently taken on device may need to go through additional processing. To learn more about deferred processing, you can checkout: https://developer.apple.com/videos/play/wwdc2023/10105/

However, if you think deferred processing took longer than expected, please submit a Feedback with a sysdiagnose using the Feedback app, and let us know the Feedback ID. Thanks!

Loading images from `PHPickerResult` with `loadFileRepresentation` taking very long time
 
 
Q