Installation

CocoaPods

Update cocoapods to the latest version.

Add pod 'YYWebImage' to your Podfile.

Run pod install or pod update.

Import <YYWebImage/YYWebImage.h>.

Notice: it doesn’t include WebP subspec by default, if you want to support WebP format, you may add pod 'YYImage/WebP' to your Podfile. You may call YYImageWebPAvailable() to check whether the WebP subspec is installed correctly.

Carthage

Add github "ibireme/YYWebImage" to your Cartfile.

Run carthage update --platform ios and add the framework to your project.

Import <YYWebImage/YYWebImage.h>.

Notice: carthage framework doesn’t include webp component, if you want to support WebP format, use CocoaPods or install manually. You may call YYImageWebPAvailable() to check whether the WebP library is installed correctly.

Manually

Download all the files in the YYWebImage subdirectory.

Add the source files to your Xcode project.

Link with required frameworks:

UIKit

CoreFoundation

QuartzCore

AssetsLibrary

ImageIO

Accelerate

MobileCoreServices

sqlite3

libz

Import YYWebImage.h.

Notice: if you want to support WebP format, you may add Vendor/WebP.framework(static library) to your Xcode project.

Documentation

Full API documentation is available on CocoaDocs.
You can also install documentation locally using appledoc.

Requirements

This library requires iOS 6.0+ and Xcode 8.0+.

License

YYWebImage is provided under the MIT license. See LICENSE file for details.