react-native-fast-image
react-native-fast-image copied to clipboard
feat: add a dependency with a glide-plugin to support APNG, animated WebP on Android
In #673, @ardalahmet provides a simple way to add support of APNG on Android.
Since glide doesn't support APNG, react-native-fast-image hasn't supported APNG on Android.
However @penfeizhou's APNG4Android provides a glide-plugin to support animation easily. It supports gif, APNG, and Animated WebP.
This PR simply applies @ardalahmet's suggestion and add it to Android's gradle dependency.
Should there be any concern of adding the glide plugin?
closes #92 #673
related PR: #703 #542
@lucalves any update whether this PR will be merged or not, it will help me a lot
@lucalves any update whether this PR will be merged or not, it will help me a lot
I can't merge because I'm not part of the project's maintainers. I just approved the PR because I didn't see anything wrong.
Just switched my app over to fast-image without realizing this wasn't yet supported.
This looks like a good, non-breaking PR. Anyone know if there's plans to merge?
Maybe some benchmark test and unit test will help?
I have little experience in react native. Can I have some suggestions for them?
I will add them if I can manage to deliver. Any help is appreciated.
@DylanVann any chance to release this?
If any Expo user needs this, I've prepared some config-plugins for you: https://gist.github.com/Hirbod/07c6641970c9406ff35a7271dda1f01c
@bcgodev this is outdated, use
implementation "com.github.zjupure:webpdecoder:2.0.4.12.0" instead.
com.github.zjupure:webpdecoder
Thanks for the reminder. I took a look at com.github.zjupure:webpdecoder and it seems it only supports webp. Please correct me if I am wrong.
I can update the version of com.github.penfeizhou.android.animation to v2.17.0. Would it be good for you?
@bcgodev I didn't check on the APNG part, I only need webP support and your implementation lib didn't work for me, but mine did.
@Hirbod Hi, just implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.17.0' will resolve your problem, it supports APNG & WEBP both.
Thanks. Are there any benefits with the other library instead of mine, beside of the APNG support? (I don't need APNG)
your implementation lib didn't work for me, but mine did.
@Hirbod Can I ask what doesn't work for you with v2.12.0?
The image wasn't animating for me. Didn't try 17 though
The image wasn't animating for me. Didn't try 17 though
I think it works for https://isparta.github.io/compare-webp/image/gif_webp/webp/2.webp
@bcgodev this is outdated, use
implementation "com.github.zjupure:webpdecoder:2.0.4.12.0"instead.
fix my problem, thx