olofd / react-native-photos-framework

A modern and comprehensive CameraRoll/iCloud-library-API for React Native 📸 📹
MIT License
220 stars 99 forks source link

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

Open sampurcell93 opened 6 years ago

sampurcell93 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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!