SDWebImage v5.7.0 Release Notes

Release Date: 2020-04-04 // about 4 years ago
  • ๐Ÿ”‹ Features

    Cache

    • โž• Added the async version API to query disk image data only
    • โž• Added the sync API to query disk image with context and options, which matches the async version

    Coder

    • ๐Ÿ”‹ Feature supports encoding options like max file size, max pixel size, as well as background color when using JPEG for alpha image #2972
    • ๐Ÿ‘ You can use .encodeMaxFileSize to limit the desired lossy file size, better than compression quality
    • You can use .encodeMaxPixelSize to limit the pixel size, like thumbnail encoding

    Transformer

    • ๐Ÿ”จ Refactory the current thumbnail && transformer about cache key. Developer should have the API to calculate the cache key from thumbnail or transformer, not hard-coded. #2966

    Context Option

    • โž• Added new query cache type support, including the SDImageCache API and context option #2968
    • You use .queryCacheType to query image from memory/disk/both cache during image pipeline loading

    ๐Ÿ›  Fixes

    • ๐Ÿ›  Fix the issue for Carthage/SwiftPM framework version symbols, this should match the framework name SDWebImage, or will get a link error when used #2971 #2969
    • Simplify the xattr helper method's code with modern Objective-C syntax #2967. Thanks @huangboju

    ๐Ÿ”„ Changes

    • ๐Ÿ”„ Change the behavior to return the abstract type for unknown image format, this can solve the accident issue for custom coder who provide a new format #2973