-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Will is support GIFs? #13
Comments
Hello, GIF support has been planned for a while, but it will have to come after a refactoring of the codebase is complete, including support for watchOS 3.0. Stay tuned! |
When I use SDWebImage to load image in CollectionView, the app will crash caused by Insufficient memory. I hope your coming update not having this problem。Best wish! |
@kiavashfaisali Thansk for this awesome tool. Have you guys made any progress with GIFs? I have been reworking your code in my project to work with GIFs. I seem to have everything working with minor additions to the code. However, when an image is saved in the cacheManager[urlAbsoluteString] it has lost the GIF CFDictionary key which is required to animate the GIFs. I created a work around by checking if the urlAbsoluteValue containes ".gif". If so, fetch from cachedResponses which includes the GIF data. I have noticed a slight lag when loading the GIF to the cells (tableView and CollectionViews). Any idea when you guys think you will get to adding GIF? Also, I can send my modifications if you're interested. Do you guys have a video loader/player? Thanks, Mike |
Hi @mreilly4, Thank you for your kind comments and interest in this project. I know GIF support is very important, but I have always wanted a native way to render them via an official API. There was a WWDC 2017 session called “What’s New in Photos” which makes reference to AnimatedImageView and AnimatedImage in Apple’s example source code, however Apple has since taken down that example and only has an old example February 2017 in its place at the moment. I get the feeling in the upcoming WWDC 2018 session we might see it again, or just native support in iOS 12, which would be the ideal way to go about adding GIF support in this framework. |
FYI, I added GIF support in my fork. Let me know your thoughts. |
@mreilly4 The code looks pretty good, we can consider adding it for a KFSwiftImageLoader 4.1 release as I'm currently improving the codebase to reduce repetition, and migrating it to Swift 4.1. I think one improvement that can be made to your code before a PR would be to look for:
in the HTTP header instead of looking for ".gif" in the urlAbsoluteString. Also, the reason I want to put this into a 4.1 release would be because WWDC is just around the corner, and it's possible Apple might support GIFs directly, in which case it would be best to just include it with a 5.0 release using Swift 5. |
No description provided.
The text was updated successfully, but these errors were encountered: