Ypimagepicker: Warning: "Unable to load image data, /var/mobile/Media/DCIM/101APPLE/XXXX.JPG"

Created on 8 Apr 2018  ·  8Comments  ·  Source: Yummypets/YPImagePicker

Getting this warning in console.

It happens both JPG and HEIC images.

Most helpful comment

Hi @onurgenes & @DamascenoRafael apparently we're not the only ones experiencing the issue (cf: https://stackoverflow.com/questions/46377824/ios-11-imagemanager-unable-to-load-image-data)
Some say it's an iOS 11 bug. As you said, everything works fine in spite of the warning. I'm going to look into it :)

All 8 comments

The same thing happens to me when I tap some image (not all) in the library. Despite this, everything works normally. Using the v3.0.0 on the iPhone X iOS 11.3

Hi @onurgenes & @DamascenoRafael apparently we're not the only ones experiencing the issue (cf: https://stackoverflow.com/questions/46377824/ios-11-imagemanager-unable-to-load-image-data)
Some say it's an iOS 11 bug. As you said, everything works fine in spite of the warning. I'm going to look into it :)

Looking at it I found that replacing
CGSize(width: asset.pixelWidth, height: asset.pixelHeight)
by
PHImageManagerMaximumSize
removes the warning log 🎉 in requestImage call in PHCachingImageManager+Extensions

Woop Woop!

Thanks! Perfect!

@onurgenes this should be good now :)

Looks fantastic! Thanks @s4cha !

  • (PHImageRequestID)requestImageForAsset:(PHAsset *)asset targetSize:(CGSize)targetSize contentMode:(PHImageContentMode)contentMode options:(nullable PHImageRequestOptions *)options resultHandler:(void (^)(UIImage *__nullable result, NSDictionary *__nullable info))resultHandler;
    使用此方法获取相册中图片时, targetSize 设置过大,导致 控制台报错 : [ImageManager] Unable to load image data,

解决方案: 调整参数,适当缩小 targetSize

It works for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

javiermanzo picture javiermanzo  ·  6Comments

rajabpour picture rajabpour  ·  3Comments

DamascenoRafael picture DamascenoRafael  ·  5Comments

Berk-Kaya picture Berk-Kaya  ·  3Comments

VitaliiDeveloper picture VitaliiDeveloper  ·  5Comments