1.SDWebImage已经升级到4.0.0
SDWebImage 4.0迁移指南
2.SDWebImage支持WebP格式
作者官方说明:
Subspecs
There are 4 subspecs available now: Core, MapKit, GIF and WebP (this means you can install only some of the SDWebImage modules. By default, you get just Core, so if you need WebP, you need to specify it).
Podfile example:
pod 'SDWebImage/WebP'
SDWebImage本身就支持webp格式的图片。默认pod是SDWebImage/Core文件,webp需要pod 'SDWebImage/WebP'
3.pod 'SDWebImage/WebP'配置
打开Finder-> command+shift+G -> 输入:/etc/hosts -> 打开https://raw.githubusercontent.com/racaljk/hosts/master/hosts中的内容全部复制到hosts文件中,然后pod就成功了