SDWebImage: JPG image data is not visible with `SDAnimatedImage(data:)`/`AnimatedImage(data:)`(SwiftUI) while png data works fine
New Issue Checklist
- I have read and understood the CONTRIBUTING guide
- I have read the Documentation
- I have searched for a similar issue in the project and found none
Issue Info
| Info | Value |
|---|---|
| Platform Name | iOS |
| Platform Version | 15.0, 17.0 |
| SDWebImage Version | 5.18.3 |
| Integration Method | SPM |
| Xcode Version | Xcode 15.0 / Xcode 15.1 Beta |
| Repro rate | all the time (100%) |
| Repro with our demo prj | not sure |
| Demo project link | SDDisplayDemo.zip |
Issue Description and Steps
Running demo project. JPG image data is not visible with SDAnimatedImage(data:)/AnimatedImage(data:)(SwiftUI) while png data works fine
PS: I’m finding a common way to display image by data without local/remote url.
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 25 (18 by maintainers)
The behavior will not changes (at least in SDWebImage 5.x). If you init
SDAnimatedImagefailed, you MUST initUIImageand re-try again. This is why weSubclass UIImageEven for UIKit code, you must do like this:
Oh…Seems this is not correct, compared to SDWebImage Core logic.
Should use this API instead:
I means, the release date of SDWebImage 5.19.0 may be delayed into next weak (2023-10-28)
Because there are some other changes (not related to this PR, but which deprecate some APIs so it need to bump minor versions…😂). I don’t want to release 5.19.0 today and another 5.20.0 next weak.
If you can’t wait to use this #3626, you can currently use the commit dependency (as you shown in screenshot) to test your project.