expo-image 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/android/build.gradle +1 -1
- package/build/Image.types.d.ts +11 -12
- package/build/Image.types.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/ImageModule.swift +4 -0
- package/ios/ImageSource.swift +0 -3
- package/ios/ImageUtils.swift +2 -2
- package/ios/ImageView.swift +8 -3
- package/local-maven-repo/BareExpo/expo.modules.image/{2.2.1/expo.modules.image-2.2.1.module → 2.3.0/expo.modules.image-2.3.0.module} +7 -7
- package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.module.md5 +1 -0
- package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.module.sha1 +1 -0
- package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.module.sha256 +1 -0
- package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.module.sha512 +1 -0
- package/local-maven-repo/BareExpo/expo.modules.image/{2.2.1/expo.modules.image-2.2.1.pom → 2.3.0/expo.modules.image-2.3.0.pom} +1 -1
- package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.pom.md5 +1 -0
- package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.pom.sha1 +1 -0
- package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.pom.sha256 +1 -0
- package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.pom.sha512 +1 -0
- package/local-maven-repo/BareExpo/expo.modules.image/maven-metadata.xml +4 -4
- package/local-maven-repo/BareExpo/expo.modules.image/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/BareExpo/expo.modules.image/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/BareExpo/expo.modules.image/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/BareExpo/expo.modules.image/maven-metadata.xml.sha512 +1 -1
- package/package.json +2 -2
- package/src/Image.types.ts +12 -13
- package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.module.md5 +0 -1
- package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.module.sha1 +0 -1
- package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.module.sha256 +0 -1
- package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.module.sha512 +0 -1
- package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.pom.md5 +0 -1
- package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.pom.sha1 +0 -1
- package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.pom.sha256 +0 -1
- package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.pom.sha512 +0 -1
- /package/local-maven-repo/BareExpo/expo.modules.image/{2.2.1/expo.modules.image-2.2.1-sources.jar → 2.3.0/expo.modules.image-2.3.0-sources.jar} +0 -0
- /package/local-maven-repo/BareExpo/expo.modules.image/{2.2.1/expo.modules.image-2.2.1-sources.jar.md5 → 2.3.0/expo.modules.image-2.3.0-sources.jar.md5} +0 -0
- /package/local-maven-repo/BareExpo/expo.modules.image/{2.2.1/expo.modules.image-2.2.1-sources.jar.sha1 → 2.3.0/expo.modules.image-2.3.0-sources.jar.sha1} +0 -0
- /package/local-maven-repo/BareExpo/expo.modules.image/{2.2.1/expo.modules.image-2.2.1-sources.jar.sha256 → 2.3.0/expo.modules.image-2.3.0-sources.jar.sha256} +0 -0
- /package/local-maven-repo/BareExpo/expo.modules.image/{2.2.1/expo.modules.image-2.2.1-sources.jar.sha512 → 2.3.0/expo.modules.image-2.3.0-sources.jar.sha512} +0 -0
- /package/local-maven-repo/BareExpo/expo.modules.image/{2.2.1/expo.modules.image-2.2.1.aar → 2.3.0/expo.modules.image-2.3.0.aar} +0 -0
- /package/local-maven-repo/BareExpo/expo.modules.image/{2.2.1/expo.modules.image-2.2.1.aar.md5 → 2.3.0/expo.modules.image-2.3.0.aar.md5} +0 -0
- /package/local-maven-repo/BareExpo/expo.modules.image/{2.2.1/expo.modules.image-2.2.1.aar.sha1 → 2.3.0/expo.modules.image-2.3.0.aar.sha1} +0 -0
- /package/local-maven-repo/BareExpo/expo.modules.image/{2.2.1/expo.modules.image-2.2.1.aar.sha256 → 2.3.0/expo.modules.image-2.3.0.aar.sha256} +0 -0
- /package/local-maven-repo/BareExpo/expo.modules.image/{2.2.1/expo.modules.image-2.2.1.aar.sha512 → 2.3.0/expo.modules.image-2.3.0.aar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 2.3.0 — 2025-06-11
|
|
14
|
+
|
|
15
|
+
### 🛠 Breaking changes
|
|
16
|
+
|
|
17
|
+
- [iOS] `useAppleWebpCodec` has been moved from the source object to the component's prop to make it usable with the local assets. ([#37300](https://github.com/expo/expo/pull/37300) by [@tsapeta](https://github.com/tsapeta))
|
|
18
|
+
|
|
13
19
|
## 2.2.1 — 2025-06-10
|
|
14
20
|
|
|
15
21
|
_This version does not introduce any user-facing changes._
|
|
@@ -25,6 +31,7 @@ _This version does not introduce any user-facing changes._
|
|
|
25
31
|
- Fix React Server Components support. ([#36801](https://github.com/expo/expo/pull/36801) by [@EvanBacon](https://github.com/EvanBacon))
|
|
26
32
|
- [iOS] Fix PhotoLibrary assets being scaled twice. ([#36776](https://github.com/expo/expo/pull/36776) by [@alanjhughes](https://github.com/alanjhughes))
|
|
27
33
|
- [iOS] Don't add transformers when unnecessary. ([#36884](https://github.com/expo/expo/pull/36884) by [@jakex7](https://github.com/jakex7))
|
|
34
|
+
- [iOS] Fix blurry images when using `tintColor` by scaling `imageThumbnailPixelSize` with screen density. ([#37235](https://github.com/expo/expo/pull/37235) by [@hirbod](https://github.com/hirbod))
|
|
28
35
|
|
|
29
36
|
## 2.1.7 — 2025-05-06
|
|
30
37
|
|
package/android/build.gradle
CHANGED
|
@@ -8,7 +8,7 @@ android {
|
|
|
8
8
|
namespace "expo.modules.image"
|
|
9
9
|
defaultConfig {
|
|
10
10
|
versionCode 1
|
|
11
|
-
versionName "2.
|
|
11
|
+
versionName "2.3.0"
|
|
12
12
|
consumerProguardFiles("proguard-rules.pro")
|
|
13
13
|
|
|
14
14
|
buildConfigField("boolean", "ALLOW_GLIDE_LOGS", project.properties.get("EXPO_ALLOW_GLIDE_LOGS", "false"))
|
package/build/Image.types.d.ts
CHANGED
|
@@ -59,18 +59,6 @@ export type ImageSource = {
|
|
|
59
59
|
* @platform ios
|
|
60
60
|
*/
|
|
61
61
|
isAnimated?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Whether to use the Apple system WebP codec.
|
|
64
|
-
*
|
|
65
|
-
* When set to `true`, use the Apple system WebP codec from `SDWebImageAWebPCoder`.
|
|
66
|
-
* When set to `false`, use the libwebp codec from `SDWebImageWebPCoder`.
|
|
67
|
-
* The Apple system WebP codec is faster and uses less memory, but it has some issues with animated WebP images.
|
|
68
|
-
* @see https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#awebp-coder
|
|
69
|
-
*
|
|
70
|
-
* @default true
|
|
71
|
-
* @platform ios
|
|
72
|
-
*/
|
|
73
|
-
useAppleWebpCodec?: boolean;
|
|
74
62
|
};
|
|
75
63
|
/**
|
|
76
64
|
* @hidden
|
|
@@ -314,6 +302,17 @@ export interface ImageProps extends Omit<ViewProps, 'style' | 'children'> {
|
|
|
314
302
|
* @platform android
|
|
315
303
|
*/
|
|
316
304
|
decodeFormat?: ImageDecodeFormat;
|
|
305
|
+
/**
|
|
306
|
+
* Whether to use the Apple's default WebP codec.
|
|
307
|
+
*
|
|
308
|
+
* Set this prop to `false` to use the official standard-compliant [libwebp](https://github.com/webmproject/libwebp) codec for WebP images.
|
|
309
|
+
* The default implementation from Apple is faster and uses less memory but may render animated images with incorrect blending or play them at the wrong framerate.
|
|
310
|
+
* @see https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#awebp-coder
|
|
311
|
+
*
|
|
312
|
+
* @default true
|
|
313
|
+
* @platform ios
|
|
314
|
+
*/
|
|
315
|
+
useAppleWebpCodec?: boolean;
|
|
317
316
|
}
|
|
318
317
|
/**
|
|
319
318
|
* It narrows down some props to types expected by the native/web side.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.types.d.ts","sourceRoot":"","sources":["../src/Image.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEjG,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,MAAM,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,UAAU,CAAC,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M,oBAAoB,GAAG;IACjC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,QAAQ,CAAC;IAEhD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,SAAS,CAAC,OAAO,CAAC;IACtD;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;OAEG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,YAAY;IAEzD,KAAK,EAAE,OAAO,QAAQ,CAAC;IAEvB,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC;CAC9E;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACjD,CAAC"}
|
package/expo-module.config.json
CHANGED
package/ios/ImageModule.swift
CHANGED
|
@@ -107,6 +107,10 @@ public final class ImageModule: Module {
|
|
|
107
107
|
view.autoplay = autoplay ?? true
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
Prop("useAppleWebpCodec", true) { (view, useAppleWebpCodec: Bool) in
|
|
111
|
+
view.useAppleWebpCodec = useAppleWebpCodec
|
|
112
|
+
}
|
|
113
|
+
|
|
110
114
|
AsyncFunction("startAnimating") { (view: ImageView) in
|
|
111
115
|
view.sdImageView.startAnimating()
|
|
112
116
|
}
|
package/ios/ImageSource.swift
CHANGED
package/ios/ImageUtils.swift
CHANGED
|
@@ -158,7 +158,7 @@ func createCacheKeyFilter(_ cacheKey: String?) -> SDWebImageCacheKeyFilter? {
|
|
|
158
158
|
/**
|
|
159
159
|
Creates a default image context based on the source and the cache policy.
|
|
160
160
|
*/
|
|
161
|
-
func createSDWebImageContext(forSource source: ImageSource, cachePolicy: ImageCachePolicy = .disk) -> SDWebImageContext {
|
|
161
|
+
func createSDWebImageContext(forSource source: ImageSource, cachePolicy: ImageCachePolicy = .disk, useAppleWebpCodec: Bool = true) -> SDWebImageContext {
|
|
162
162
|
var context = SDWebImageContext()
|
|
163
163
|
|
|
164
164
|
// Modify URL request to add headers.
|
|
@@ -175,7 +175,7 @@ func createSDWebImageContext(forSource source: ImageSource, cachePolicy: ImageCa
|
|
|
175
175
|
|
|
176
176
|
// Passing useAppleWebpCodec into WebPCoder
|
|
177
177
|
context[.imageDecodeOptions] = [
|
|
178
|
-
imageCoderOptionUseAppleWebpCodec:
|
|
178
|
+
imageCoderOptionUseAppleWebpCodec: useAppleWebpCodec
|
|
179
179
|
]
|
|
180
180
|
|
|
181
181
|
// Assets from the bundler have `scale` prop which needs to be passed to the context,
|
package/ios/ImageView.swift
CHANGED
|
@@ -68,6 +68,8 @@ public final class ImageView: ExpoView {
|
|
|
68
68
|
|
|
69
69
|
var autoplay: Bool = true
|
|
70
70
|
|
|
71
|
+
var useAppleWebpCodec: Bool = true
|
|
72
|
+
|
|
71
73
|
// MARK: - Events
|
|
72
74
|
|
|
73
75
|
let onLoadStart = EventDispatcher()
|
|
@@ -134,7 +136,7 @@ public final class ImageView: ExpoView {
|
|
|
134
136
|
if sdImageView.image == nil {
|
|
135
137
|
sdImageView.contentMode = contentFit.toContentMode()
|
|
136
138
|
}
|
|
137
|
-
var context = createSDWebImageContext(forSource: source, cachePolicy: cachePolicy)
|
|
139
|
+
var context = createSDWebImageContext(forSource: source, cachePolicy: cachePolicy, useAppleWebpCodec: useAppleWebpCodec)
|
|
138
140
|
|
|
139
141
|
// Cancel currently running load requests.
|
|
140
142
|
cancelPendingOperation()
|
|
@@ -145,7 +147,10 @@ public final class ImageView: ExpoView {
|
|
|
145
147
|
// we tell the SVG coder to decode to a bitmap instead. This will become useless when we switch to SVGNative coder.
|
|
146
148
|
if imageTintColor != nil {
|
|
147
149
|
context[.imagePreserveAspectRatio] = true
|
|
148
|
-
context[.imageThumbnailPixelSize] =
|
|
150
|
+
context[.imageThumbnailPixelSize] = CGSize(
|
|
151
|
+
width: sdImageView.bounds.size.width * screenScale,
|
|
152
|
+
height: sdImageView.bounds.size.height * screenScale
|
|
153
|
+
)
|
|
149
154
|
}
|
|
150
155
|
|
|
151
156
|
// Some loaders (e.g. PhotoLibraryAssetLoader) may need to know the screen scale.
|
|
@@ -311,7 +316,7 @@ public final class ImageView: ExpoView {
|
|
|
311
316
|
// to cache them or apply the same policy as with the proper image?
|
|
312
317
|
// Basically they are also cached in memory as the `placeholderImage` property,
|
|
313
318
|
// so just `disk` policy sounds like a good idea.
|
|
314
|
-
var context = createSDWebImageContext(forSource: placeholder, cachePolicy: .disk)
|
|
319
|
+
var context = createSDWebImageContext(forSource: placeholder, cachePolicy: .disk, useAppleWebpCodec: useAppleWebpCodec)
|
|
315
320
|
|
|
316
321
|
let isPlaceholderHash = placeholder.isBlurhash || placeholder.isThumbhash
|
|
317
322
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "BareExpo",
|
|
5
5
|
"module": "expo.modules.image",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.3.0",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
],
|
|
55
55
|
"files": [
|
|
56
56
|
{
|
|
57
|
-
"name": "expo.modules.image-2.
|
|
58
|
-
"url": "expo.modules.image-2.
|
|
57
|
+
"name": "expo.modules.image-2.3.0.aar",
|
|
58
|
+
"url": "expo.modules.image-2.3.0.aar",
|
|
59
59
|
"size": 279544,
|
|
60
60
|
"sha512": "47c107c9a1134bb50953e5cf037cdc5aef8088d6c1bce906d268f2cf2c6b1a2692dbbd4cf686922d9eded7a78e275fea8038b91267fffd31957fa68b297bdae8",
|
|
61
61
|
"sha256": "5d682f47a7031c3d5403faf294bb898f52299dcc73903682475cc310c39e70ac",
|
|
@@ -143,8 +143,8 @@
|
|
|
143
143
|
],
|
|
144
144
|
"files": [
|
|
145
145
|
{
|
|
146
|
-
"name": "expo.modules.image-2.
|
|
147
|
-
"url": "expo.modules.image-2.
|
|
146
|
+
"name": "expo.modules.image-2.3.0.aar",
|
|
147
|
+
"url": "expo.modules.image-2.3.0.aar",
|
|
148
148
|
"size": 279544,
|
|
149
149
|
"sha512": "47c107c9a1134bb50953e5cf037cdc5aef8088d6c1bce906d268f2cf2c6b1a2692dbbd4cf686922d9eded7a78e275fea8038b91267fffd31957fa68b297bdae8",
|
|
150
150
|
"sha256": "5d682f47a7031c3d5403faf294bb898f52299dcc73903682475cc310c39e70ac",
|
|
@@ -163,8 +163,8 @@
|
|
|
163
163
|
},
|
|
164
164
|
"files": [
|
|
165
165
|
{
|
|
166
|
-
"name": "expo.modules.image-2.
|
|
167
|
-
"url": "expo.modules.image-2.
|
|
166
|
+
"name": "expo.modules.image-2.3.0-sources.jar",
|
|
167
|
+
"url": "expo.modules.image-2.3.0-sources.jar",
|
|
168
168
|
"size": 64200,
|
|
169
169
|
"sha512": "4fd35480bc1edafe3727afbfb6b1d9cf69643f30523402e7512a8b2944d17915150373225d5aed1c344b80ad9c9b3fe1ff1050b2c83a13c8faa34956ddef588e",
|
|
170
170
|
"sha256": "d91f60ce8ec04a24413f687b5596f0165504d5b55d05c380daea5b155e537100",
|
package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.module.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f787419de17979664671c9c1d9afbb41
|
package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.module.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1993ead885f0a7310e0a376220b5aade845cbf1f
|
package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.module.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9b5811ce6d6eda8562d1bfd550f6f0bd854d4a2d09b7a99b057afc00d327d0db
|
package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.module.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a51e938daecf90676b806d23b262ce9bc84f5cd6953be9fe99c4be6ec5e126bf85411d323254f9262ec36195a011068fe1d21eea59dcf74590db16d7867369cb
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>BareExpo</groupId>
|
|
11
11
|
<artifactId>expo.modules.image</artifactId>
|
|
12
|
-
<version>2.
|
|
12
|
+
<version>2.3.0</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.image</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
69c1c663ba7e9ba97cf0a0a50e8bcae6
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a1a22507ecf53f3d5d410cb98f16d854cc027bba
|
package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
564e61b10d1d85a0b6e9ab138434c3e1a0273600b387c313ea18746c5b5370a1
|
package/local-maven-repo/BareExpo/expo.modules.image/2.3.0/expo.modules.image-2.3.0.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4a6330b3b36a3bc5b93281243ce84496e6621bff368b0a8d97711776e1cabab4eb5189746cea93b0bb29d6ec6fe5683f8c0dee95e7349b987ca62a0b964bd91b
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>BareExpo</groupId>
|
|
4
4
|
<artifactId>expo.modules.image</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>2.
|
|
7
|
-
<release>2.
|
|
6
|
+
<latest>2.3.0</latest>
|
|
7
|
+
<release>2.3.0</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>2.
|
|
9
|
+
<version>2.3.0</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20250611001004</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
021cad94f071976e1d1437ed79245699
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f4fdf33fd9c355c18c0c137c383d69a4067fe68e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
428d383564c40bfd27fbecd375b71166a3ec1eaf1d661b1ec7d8fd2ea84adc17
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
532d8e4267d4baffbece54b784d8b3780490a20232ff8bd2f57b6ab2e78081f9d3187928c7fdd1c29e4dc08014c7ac27fa219fe879615d412cca7bf8c720557e
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-image",
|
|
3
3
|
"title": "Expo Image",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"description": "A cross-platform, performant image component for React Native and Expo with Web support",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"types": "build/index.d.ts",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"jest": {
|
|
46
46
|
"preset": "expo-module-scripts"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "49df447d109074aff959349e689ad9ac27f58086"
|
|
49
49
|
}
|
package/src/Image.types.ts
CHANGED
|
@@ -64,19 +64,6 @@ export type ImageSource = {
|
|
|
64
64
|
* @platform ios
|
|
65
65
|
*/
|
|
66
66
|
isAnimated?: boolean;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Whether to use the Apple system WebP codec.
|
|
70
|
-
*
|
|
71
|
-
* When set to `true`, use the Apple system WebP codec from `SDWebImageAWebPCoder`.
|
|
72
|
-
* When set to `false`, use the libwebp codec from `SDWebImageWebPCoder`.
|
|
73
|
-
* The Apple system WebP codec is faster and uses less memory, but it has some issues with animated WebP images.
|
|
74
|
-
* @see https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#awebp-coder
|
|
75
|
-
*
|
|
76
|
-
* @default true
|
|
77
|
-
* @platform ios
|
|
78
|
-
*/
|
|
79
|
-
useAppleWebpCodec?: boolean;
|
|
80
67
|
};
|
|
81
68
|
|
|
82
69
|
/**
|
|
@@ -363,6 +350,18 @@ export interface ImageProps extends Omit<ViewProps, 'style' | 'children'> {
|
|
|
363
350
|
* @platform android
|
|
364
351
|
*/
|
|
365
352
|
decodeFormat?: ImageDecodeFormat;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Whether to use the Apple's default WebP codec.
|
|
356
|
+
*
|
|
357
|
+
* Set this prop to `false` to use the official standard-compliant [libwebp](https://github.com/webmproject/libwebp) codec for WebP images.
|
|
358
|
+
* The default implementation from Apple is faster and uses less memory but may render animated images with incorrect blending or play them at the wrong framerate.
|
|
359
|
+
* @see https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#awebp-coder
|
|
360
|
+
*
|
|
361
|
+
* @default true
|
|
362
|
+
* @platform ios
|
|
363
|
+
*/
|
|
364
|
+
useAppleWebpCodec?: boolean;
|
|
366
365
|
}
|
|
367
366
|
|
|
368
367
|
/**
|
package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.module.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
68f7fdd9bb580a45ca6a2b28966bb92a
|
package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.module.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
440582c012d843c710e2aad1f0b594eceef1ac9c
|
package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.module.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1da6c5d9e843f648a495bff1898078645d6fc40e0438e2767b20865d6370820a
|
package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.module.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
360b7da458b76909c925b18472d066a86e02a4029059c215ccfd736e2dfc17234a36833702c64fea6213e291c4e08ccd13fbbd085196ffa0d2cd8b62c7fc90ac
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
dcd75046d1305e32fdec8b8d2241cf60
|
package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.pom.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
92f8432c3fc62cd52d6f9927026abf26ae09e0e9
|
package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.pom.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3f3d44f8bf3e09d7a9723a5da4f5a050e6b5fed418758640c5e9db158c016f3f
|
package/local-maven-repo/BareExpo/expo.modules.image/2.2.1/expo.modules.image-2.2.1.pom.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
34b291a6f96505e99235d66929f7c0f2aa0ba40276d775a511a9133aff76a60611367ac85d6c3f6c5c0f8eb5c7f4234050cf2ed25784e1a074ad335a758deeb2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|