SDWebImageSwiftUI icon indicating copy to clipboard operation
SDWebImageSwiftUI copied to clipboard

The images in WebP format are not loading or displaying correctly on iOS 15, but they work fine on iOS 17. I haven’t tested on iOS 16 yet.

Open sangampokharel opened this issue 1 year ago • 2 comments

Steps to Reproduce:

  1. Run the app on an iOS 15 device but works perfectly in iOS 17
  2. Attempt to load a WebP image using SDWebImageSwiftUI.
  3. Observe that the image does not display as expected.

Expected Behavior: WebP images should load and display correctly on iOS 15, similar to how they work on iOS 17.

Actual Behavior: The WebP images are not loading or displaying correctly on iOS 15.

Additional Information:

  • SDWebImageSwiftUI version: 2.2.7
  • iOS version: 15.x
  • WebP images are loading fine on iOS 17.
  • I have not tested on iOS 16 yet.

if let url = URL(string: "https://www.gstatic.com/webp/gallery/1.webp") {

WebImage(url:url) .resizable() .placeholder(Image("vendor_background_placeholder")) .onSuccess { image, data, cacheType in print("Image successfully loaded") } .onFailure(perform: { error in print("Image loading failed (error.localizedDescription)") })

}

in ios 17 I am seeing logs "Image loaded successfully" but in ios 15 neither success nor failure log is displayed in console

pod 'SDWebImageSwiftUI'

Please let me know if there are any additional steps I should take or if there are any workarounds available.

Thank you!

sangampokharel avatar Sep 19 '24 05:09 sangampokharel

Anything related to Apple's own decoder (ImageIO framwork), maybe you should ask Apple to fix :)

If not, you can have a try with our custom decoder using libwebp (open-sourced)

https://github.com/SDWebImage/SDWebImageWebPCoder

dreampiggy avatar Sep 19 '24 11:09 dreampiggy

Read this link: https://github.com/SDWebImage/SDWebImage?tab=readme-ov-file#supported-image-formats

Apple's system decoder may have different behavior on different firmware OS version, but our third-party based decoder always has the same behavior across any firmware version

dreampiggy avatar Sep 19 '24 11:09 dreampiggy