fixing animated gif support

This commit is contained in:
Roland Osborne 2025-03-14 14:28:36 -07:00
parent 2ef440c4ee
commit aab6293c49
3 changed files with 6 additions and 3 deletions

View File

@ -89,7 +89,7 @@ android {
applicationId "com.databag"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1125
versionCode 1145
versionName "1.5"
}
signingConfigs {
@ -114,6 +114,9 @@ android {
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation 'com.facebook.fresco:animated-gif:3.2.0'
implementation 'com.facebook.fresco:animated-webp:3.2.0'
implementation 'com.facebook.fresco:webpsupport:3.2.0'
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")

View File

@ -1,7 +1,7 @@
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 24
minSdkVersion = 34
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "26.1.10909125"

View File

@ -19,7 +19,7 @@ async function getImageThumb(path: string, type: string, size: number) {
if (size < IMAGE_SCALE_SIZE) {
const type = await fileType(path);
const base = await RNFS.readFile(path, 'base64')
return `data:image/{type.ext};base64,${base}`;
return `data:image/${type.ext};base64,${base}`;
} else {
const thumb = await ImageResizer.createResizedImage(path, 192, 192, "JPEG", 50, 0, null);
const base = await RNFS.readFile(thumb.path, 'base64')