olofd/react-native-photos-framework

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

sampurcell93 opened this issue · 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!

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?

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.

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!