Loading source is not constrained to size
perry-mitchell opened this issue · 3 comments
I'm using this library to present website icons in my app, which work very nicely. I'm having an issue with the loadingSource
image, however, which is not constrained to the same size as the website icon. You can see that it's much larger (perhaps original size) during load:
Here's how I'm using it:
<CachedImage
loadingSource={ICON_TYPES[type]}
source={`${ICON_LOOKUP}${encodeURIComponent(domain)}`}
style={{ height: size, width: size }}
/>
ICON_TYPES[type]
is just a local imported png
image.
Could you try the loadingImageStyle prop and let us know?
@geobako Thanks for the response! Actually I just fixed this by applying a style to the surrounding view (overflow: hidden), which has fixed it. I didn't get a chance to try loadingImageStyle
yet, but if I remember I'll give it a go and will report back.
Just want to say that this library is working amazingly well, I'm really impressed. Great job!