Skip to content

Commit

Permalink
feat: support for animated avif on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
princektripathi committed Dec 2, 2024
1 parent d1b6760 commit d4a4deb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RNFastImage.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ Pod::Spec.new do |s|
end
s.dependency 'SDWebImage', '~> 5.18.7'
s.dependency 'SDWebImageWebPCoder', '~> 0.14'
s.dependency 'SDWebImageAVIFCoder', '~> 0.11.0'
s.dependency 'libavif/libdav1d', '~> 0.11.1'
s.dependency 'libavif/core', '~> 0.11.1'
end
4 changes: 4 additions & 0 deletions ios/FastImage/FFFastImageView.mm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import "FFFastImageView.h"
#import <SDWebImage/UIImage+MultiFormat.h>
#import <SDWebImage/UIView+WebCache.h>
#import <SDWebImageAVIFCoder/SDImageAVIFCoder.h>

@interface FFFastImageView ()

Expand Down Expand Up @@ -101,6 +102,9 @@ - (id) init {
self = [super init];
self.resizeMode = RCTResizeModeCover;
self.clipsToBounds = YES;
if (self) {
[[SDImageCodersManager sharedManager] addCoder:[SDImageAVIFCoder sharedCoder]];
}
return self;
}

Expand Down

0 comments on commit d4a4deb

Please sign in to comment.