nativescript-community / ui-image

Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.
Apache License 2.0
36 stars 9 forks source link

PNG isn't cached in IOS #28

Closed sdfullstack closed 8 months ago

sdfullstack commented 4 years ago

Hello, Not sure if it only happen to me, but if seems the PNG images isn't cached in IOS, in Android it is ok. From my understanding nativescript-image is using sdwebimage at the behind for IOS, and from the document sdwebimage said they support PNG image.

So in this case, what can I do to get PNG cached in IOS?

Thanks in advance for your help.

farfromrefug commented 4 years ago

@sdfullstack must be a http header cache issue. Without and any reproducable example it is quite difficult to help you.

sdfullstack commented 4 years ago

@farfromrefug in my case, I do believe all images have the same http cache, please see the Response headers:

accept-ranges: bytes access-control-allow-origin: * cache-control: max-age=2592000 cache-control: public content-length: 226517 content-type: image/png date: Sat, 20 Jun 2020 08:46:50 GMT etag: "5ea92b9f-374d5" expires: Mon, 20 Jul 2020 08:46:50 GMT front-end-https: on last-modified: Wed, 29 Apr 2020 07:24:15 GMT server: nginx status: 304 x-frame-options: ALLOWALL

---------_

Do you have any idea? thanks for your help.

farfromrefug commented 4 years ago

@sdfullstack no i dont. As mentioned i cant do anything with a sample repro

sdfullstack commented 4 years ago

@farfromrefug I think I know when it happen. The PNG image will not be cached if we have the attribute to modify the cache image, EX: decodeWidth , decodeHeight, roundedCornerRadius, roundTopLeft, ...

farfromrefug commented 4 years ago

@sdfullstack ok might be! Though it means it is an issue on SDWebImage side (ios native lib). I advise you to go look in their repo if you see an issue related to this. Also check the version used in your app. The podfile for the plugin is this pod 'SDWebImage', '>= 5.7.1'