Skip to content
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

Open
Jinkeycode opened this issue Oct 4, 2016 · 6 comments
Open

Will is support GIFs? #13

Jinkeycode opened this issue Oct 4, 2016 · 6 comments

Comments

@Jinkeycode
Copy link

No description provided.

@kiavashfaisali
Copy link
Owner

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!

@Jinkeycode
Copy link
Author

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!

@mreilly4
Copy link

@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

@kiavashfaisali
Copy link
Owner

Hi @mreilly4,

Thank you for your kind comments and interest in this project.
I am hoping to put some time this weekend to work on KFSwiftImageLoader 4.0 with Swift 4.1 support and some code modernization.

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.

@mreilly4
Copy link

mreilly4 commented May 4, 2018

FYI, I added GIF support in my fork. Let me know your thoughts.

@kiavashfaisali
Copy link
Owner

@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:

Content-Type: image/gif

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.

@kiavashfaisali kiavashfaisali added this to the KFSwiftImageLoader 4.1 milestone May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants