mrousavy / mrousavy/react-native-nitro-image
Are animated images like webp or gif supported on Android?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 652
- Forks
- 37
- Avg merge
- 56m
- Merged PRs (30d)
- 6
Description
Hi team! I'm trying to integrate Nitro Image into our app but I ran into some issues. To narrow it down, I created simple Expo App and installed nitro image there. While ios is working fine, on Android I'm hitting error Requested Image is not a Bitmap! when trying to load remote animated gif. I got the same issue with animated webp.
To reproduce I just did in my component:
const gifImage = useImage({
url: "https://www.easygifanimator.net/images/samples/imageeffects.gif",
});
. . .
{gifImage.image && (
<NitroImage
image={gifImage.image}
style={{ width: 200, height: 200 }}
/>
)}
Is this something on my side? I understand that Coil should support animated image: https://coil-kt.github.io/coil/gifs/ if AnimatedImageDecoder is loaded. The error I'm getting is throw from here: https://github.com/mrousavy/react-native-nitro-image/blob/main/packages/react-native-nitro-web-image/android/src/main/java/com/margelo/nitro/web/image/ImageLoader%2BloadImageAsync.kt#L34
Is react-native-nitro-web-image preventing animated images?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Android loader at packages/react-native-nitro-web-image/android/src/main/java/com/margelo/nitro/web/image/ImageLoader+loadImageAsync.kt:34 and reproduce the issue in the supplied Expo component with the remote GIF and animated WebP. Check how Coil is configured, including whether AnimatedImageDecoder is loaded. Done means animated GIF and WebP images render on Android without the “Requested Image is not a Bitmap!” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100