Skip to content

Consider switching to a different iOS image loading library. #13

Open
@DylanVann

Description

@DylanVann

Although it's very performant and used in tons of applications the API for SDWebImage is sort of weird.

e.g. The API for prefetching:

Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching, currently one image is downloaded at a time, and skips images for failed downloads and proceed to the next image in the list. Any previously-running prefetch operations are canceled.

completionBlock
block to be called when prefetching is completed first param is the number of completed (successful or not) requests, second parameter is the number of skipped requests

Weird things:

  • One at a time.
  • Cancels any previous prefetch operation.
  • Tells you the number of successful and unsuccessful requests, not which images were successful or unsuccessful.

e.g. The API for headers:

headersFilter
Set filter to pick headers for downloading image HTTP request.
This block will be invoked for each downloading image request, returned NSDictionary will be used as headers in corresponding HTTP request.

Weird things:

  • Headers are not a property of each request (they should be).
  • Why is a singleton property being used to dynamically determine the headers for each request?
  • What if I had two requests to the same url that should have different headers?
    (The api of headersFilter does not allow that)

Maybe there's another native library we could use that's more straightforward than this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions