react-native-photos-framework icon indicating copy to clipboard operation
react-native-photos-framework copied to clipboard

Assets in <Image> sometimes render a placeholder when the dimensions are "wrong"

Open sampurcell93 opened this issue 8 years ago • 3 comments

Hi, I've noticed that sometimes, the size of my images affects if they're rendered at all. For example, giving an image {width: 100, height: 100} works fine, but {width: 75, height: 100} does not work. It renders a JPG placeholder instead. How can I go about fixing this? I noticed the prepareForSizeDisplay param but I am not sure if it will help or how to format it.

Thanks!

sampurcell93 avatar Nov 02 '17 17:11 sampurcell93

PS: I noticed that the only photos this happens to seem to be photos that returned originally with an "unknown" type. Any insight as to why unknown is returned some times?

sampurcell93 avatar Nov 02 '17 20:11 sampurcell93

PPS: It seems that "unknown types" are mostly Live Photos (.mov files when you get right down to it) that the lib doesn't recognize.

sampurcell93 avatar Nov 02 '17 23:11 sampurcell93

PPS: Live photos are unknown only in iOS versions less than 10, it seems. In ios10+ they return with image/heic as their mimetype... I'll make a PR adding some of this to the docs!

sampurcell93 avatar Nov 03 '17 20:11 sampurcell93