Latest 0.2.0
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0, watchos 2.0
Dependencies SDWebImage, libavif

CI Status
Carthage compatible

What’s for

This is a SDWebImage coder plugin to add AV1 Image File Format (AVIF) support. Which is built based on the open-sourced libavif codec.

This AVIF coder plugin currently support AVIF still image decoding. Including alpha channel, as well as 10bit/12bit HDR images.

The AVIF encoding is also supported now. Which always encode as 8-bit depth images.

Note: AVIF image spec is still in evolve. And the current upstream AVIF codec is a simple implementation. The encoding time may be long for large images.

Since AVIF is AV1-based inside HEIF image container. In the future, this repo may moved to existing HEIF coder plugin SDWebImageHEIFCoder instead.


  • iOS 8
  • macOS 10.10
  • tvOS 9.0
  • watchOS 2.0



SDWebImageAVIFCoder is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'SDWebImageAVIFCoder'

Note: From version 0.2.0, the dependency libavif and libaom use the portable C implementation to works on Apple platforms. If you need the pre-built library with SIMD/AVX and assembly optimization, try the 0.1.0 version.


SDWebImageAVIFCoder is available through Carthage.

github "SDWebImage/SDWebImageAVIFCoder"


To use AVIF coder, you should firstly add the SDImageAVIFCoder.sharedCoder to the coders manager. Then you can call the View Category method to start load AVIF images.

  • Objective-C
SDImageAVIFCoder *AVIFCoder = SDImageAVIFCoder.sharedCoder;
[[SDImageCodersManager sharedManager] addCoder:AVIFCoder];
UIImageView *imageView;
[imageView sd_setImageWithURL:url];
  • Swift
let AVIFCoder = SDImageAVIFCoder.shared
let imageView: UIImageView
imageView.sd_setImage(with: url)


The images are from AV1 Still Image File Format Specification Test Files.

AVIF Image Viewer

AVIF is a new image format, which lack of related toolchains like Browser or Desktop Viewer support.

You can try AVIFQuickLook QuickLook plugin on macOS to view it in Finder.

You can also try using avif.js to view it online by using Chrome’s AV1 codec.


DreamPiggy, [email protected]


SDWebImageAVIFCoder is available under the MIT license. See the LICENSE file for more info.


Latest podspec

    "name": "SDWebImageAVIFCoder",
    "version": "0.2.0",
    "summary": "A SDWebImage coder plugin to support AVIF(AV1 Image File Format) image",
    "description": "This is a SDWebImage coder plugin to add AV1 Image File Format (AVIF) support.nWhich is built based on the open-sourced libavif codec.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "DreamPiggy": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.2.0"
    "module_map": "SDWebImageAVIFCoder/Module/SDWebImageAVIFCoder.modulemap",
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    "source_files": [
    "dependencies": {
        "SDWebImage": [
            "~> 5.0"
        "libavif": [
            ">= 0.1.3"

Pin It on Pinterest

Share This