See all tickets marked for the 4.0.0 release
- Add an option to scale down large images #787 00bf467 efad1e5 8d1a0ae. Fixed #538, #880 and #586. This one is a more robust solution than #884 or #894. Can be activated via
SDWebImageScaleDownLargeImages
orSDWebImageDownloaderScaleDownLargeImages
- Fixed #1668 CGContextDrawImage: invalid context 0x0 - b366d84
See all tickets marked for the 4.0.0 release
- support for watchOS and OS X platforms #1595
- the
SDWebImage xcodeproj
contains the following targets:SDWebImage iOS static
(iOS static lib)SDWebImage watchOS static
(watchOS static lib)SDWebImage OSX
(OSX dynamic framework)SDWebImage iOS
(iOS dynamic framework)SDWebImage tvOS
(tvOS dynamic framework)SDWebImage watchOS
(watchOS dynamic framework)- the
SDWebImage Demo xcodeproj
contains the following targets:SDWebImage OSX Demo
SDWebImage iOS Demo
SDWebImage TV Demo
SDWebImage Watch Demo
- bumped
libwep
version to0.5.1
- improved unit testing code coverage (35% -> 77%) and integrated CodeCov
- removed all deprecated methods (that we carried around for backwards compatibility in previous versions) #774
- Renamed
SDWebImageManager
downloadImageWithURL:options:progress:completed:
toloadImageWithURL:options:progress:completed:
as it makes more sense, since we check the cache first and download only if needed a32a177 - Deleted targets:
SDWebImage+MKAnnotation
,SDWebImage+WebP
,SDWebImageFramework
:SDWebImage
target that build as a static library (all subspecs included) ->libSDWebImage.a
SDWebImageiOS
andSDWebImagetvOS
targets that build as dynamic frameworks
- Renamed the dynamic frameworks targets from
WebImage
toSDWebImage
. Renamed theWebImage.h
toSDWebImage.h
to match the framework naming - Renamed the schemes for consistency. Updated the Tests Podfile + project.
- For #883 Fix multiple requests for same image and then canceling one, several breaking changes were needed:
SDWebImageDownloader
method- downloadImageWithURL:options:progress:completed:
now returns aSDWebImageDownloadToken *
instead ofid <SDWebImageOperation>
(give the ability to cancel downloads using the returned token)SDWebImageDownloaderOperation
initializer- initWithRequest:options:progress:completed:cancelled
split into- initWithRequest:options
andaddHandlersForProgress:completed:
. Note: there is no more cancel block
- Modern Objective-C syntax done in 64382b9 includes:
- initializers now return
instancetype
instead ofid
- explicit designated initializers (i.e. for
SDImageCache
)
- initializers now return
- For #1575 GIF support using FLAnimatedImage, several changes were needed:
- replaced type
SDWebImageQueryCompletedBlock
withSDCacheQueryCompletedBlock
and added anNSData *
param - because of the change above, the
done
param ofSDImageCache
queryDiskCacheForKey:done:
is now aSDCacheQueryCompletedBlock
and those blocks must now include anNSData *
param - replaced type
SDWebImageCompletionWithFinishedBlock
withSDInternalCompletionBlock
and added anNSData *
param - because of the change above, the
completed
param ofSDWebImageManager
loadImageWithURL:options:progress:completed:
is nowSDInternalCompletionBlock
and those blocks must now include anNSData *
param - for consistency with the previous change, also renamed
SDWebImageCompletionBlock
toSDExternalCompletionBlock
UIImage
will no longer respond tosd_animatedGIFNamed:
orsd_animatedImageByScalingAndCroppingToSize:
- replaced type
- Xcode 7 Objective-C updates (Lightweight Generics and Nullability) #1581
- breaks compatibility at least for Swift users of the framework
- watchOS and OS X support #1595 required
- renamed
SDWebImage
iOS static lib target toSDWebImage iOS static
for clarity
- renamed
- improving the unit tests code coverage #1681 required
- Refactored
NSData
ImageContentType
category, instead of returning the contentType as a string, the new added methodsd_imageFormatForImageData
will return aSDImageFormat
enum value SDImageCache
configuration properties moved intoSDImageCacheConfiguration
(which is now available viaconfig
property):shouldDecompressImages
shouldDisableiCloud
shouldCacheImagesInMemory
maxCacheAge
maxCacheSize
- The
storeImage:
methods fromSDImageCache
were async already, but declared as sync. Properly marked them as async + added completion. Got rid of the recalculate param. If theNSData
is provided, use it. Otherwise, recalculate from theUIImage
- Removed the synchronous methods
diskImageExistsForURL:
andcachedImageExistsForURL:
fromSDWebImageManager
- Removed the synchronous method
diskImageExistsWithKey:
fromSDImageCache
- Get rid of the confusion caused by
cleanDisk
andclearDisk
onSDImageCache
. RenamedcleanDisk
todeleteOldFiles
. No longer expose the syncclearDisk
anddeleteOldFiles
, just the async ones. - Renamed
SDImageCache
queryDiskCacheForKey:done:
toqueryCacheOperationForKey:done:
- Another
SDImageCache
clarification:imageFromDiskCacheForKey:
used to also check the memory cache which I think is misleading. NowimageFromDiskCacheForKey
only checks the disk cache and the new methodimageFromCacheForKey
checks both caches - Got rid of
removeImageForKey:
andremoveImageForKey:fromDisk:
fromSDImageCache
that looked sync but were async. Left only the 2 async ones - Removed
UIImageView
sd_cancelCurrentHighlightedImageLoad
- Refactored
- Added
sd_
prefix to the activity indicator related methods (setShowActivityIndicatorView:
,setIndicatorStyle:
,showActivityIndicatorView
,addActivityIndicator
,removeActivityIndicator
) #1640 - Use
dispatch_main_async_safe
for all the completion blocks on the main queue (used to bedispatch_sync
) - avoiding locks. - Removed
dispatch_main_sync_safe
as it can be mistakenly used - Add
url
as param to progress blockSDWebImageDownloaderProgressBlock
- #984
- Switched our GIF support to a better implementation: FLAnimatedImage by Flipboard #1575
- requires iOS 8+ (it's the only way due to FLAnimatedImage requirements)
- the implementation relies on a
WebCache
category on top ofFLAnimatedImageView
- details in the README
- Converted any remaining code to Modern Objective-C syntax - 64382b9
- Xcode 7 Objective-C updates (Lightweight Generics and Nullability) #1581
- via #1595 Clarified and simplified the usage of
TARGET_OS_*
macros. AddedSD_MAC
,SD_UIKIT
,SD_IOS
,SD_TV
,SD_WATCH
. The biggest issue here wasTARGET_OS_MAC
was 1 for all platforms and we couldn't rely on it. - Replaces #1398 Allow to customise cache and image downloader instances used with
SDWebImageManager
- added a new initializer (initWithCache:downloader:
) 9112170 UIImage
responds tosd_imageData
andsd_imageDataAsFormat:
via theMultiFormat
category. Those methods transform aUIImage
to theNSData
representation 82d1f2e- Created
SDWebImageDownloaderOperationInterface
to describe the behavior of a downloader operation. Any custom operation must conform to this protocol df3b6a5 - Refactored all the duplicate code from our
WebCache
categories into aUIView
WebCache
category. All the other categories will make calls to this one. Customization of setting the image is done via thesetImageBlock
and theoperationKey
e1840c3 - Due to the change above, the activity indicator can now be added to
UIButton
,MKAnnotationView
,UIImageView
- Animated WebP support #1438
- The shared objects (not really singletons) should allow subclassing, therefore the return type of the shared resource method should be
instancetype
and not a fixed type - c57cf7e - Allow to specify
NSURLSessionConfiguration
forSDWebImageDownloader
#1654 - Add
url
as param to progress blockSDWebImageDownloaderProgressBlock
- #984
- Fix multiple requests for same image and then canceling one #883 + 8a78586
- Fixed #1444 and the master build thanks to @kenmaz
- Fixed an issue with the
SDWebImageDownloaderOperation
:cancelInternal
was not called because of the old mechanism rellying on thethread
property - probably because that thread did not have a runloop. Removed that and now cancelInternal is called as expected f4bdae6 - Replaced #781 on replacing dispatch_sync with dispatch_async for the main queue 062e50a f7e8246 c77adf4 fdb8b2c 265ace4 0c47bc3. Check for main queue instead of main thread.
- Fixed #1619 iOS 10 crash (
setObjectForKey: object cannot be nil
) - #1676 7940577 - Fixed #1326 #1424 (
Carthage bitcode issue
) - #1593 - Fixed #1639 via #1657 (
Add support for downloading images behind redirect
) - Replaced #1537 via 9cd6779 - fixed a potential retain cycle
- Updated
dispatch_main_async_safe
macro in order to avoid redefinition when included as Pod - Fixed #1089 by updating the docs on the calling queue for the
progressBlock
(background queue) - Fixed a compilation issue on
FLAnimatedImageView+WebCache
- #1687
- Fixed #1608 #1623 #1644 Crash in
[NSURLCache cachedResponseForRequest:]
- the fix is actually avoiding to accessNSURLCache
which appears to generate a race condition. We only call it if necesarry (SDWebImageRefreshCached
is used and the image cannot be cached by the system when it's too big or behind authentication)
- SDWebImage 3.8.0 get wrong image #1589 - the issue was caused by the changes in 3.8.0 (Removed the URL query params from the filename (key) fb0cdb6d 1bf62d4 #1584 - fixes #1433 #1553 #1583 #1585) - Reverted.
- Note: The solution for those issues (i.e. #1433 #1553) is to set the
SDWebImageManager
cacheKeyFilter
block and do their own calculations there.
- Had to update the iOS deployment target to 7.0 from 5 - 6545a3a
- Replace deprecated
NSURLConnection
withNSURLSession
#1578 #1586 - fixes #1291 #1318 #823 #1566 #1515 - Allow to customise cache and image downloader instances used with
SDWebImageManager
86fc47bf7b - fixes #1398 #870
- Removed the URL query params from the filename (key) fb0cdb6d 1bf62d4 #1584 - fixes #1433 #1553 #1583 #1585
- Fixed the WebP build with the official 1.0.0 CocoaPods release f1a471e - fixes #1444
- Updated doc:
removeImageForKey:
not synchronous e6e5c51 - fixes #1379 #1415
- Changed the libwebp git url so that people from China can access it - #1390 (from
https://chromium.googlesource.com/webm/libwebp
tohttps://github.com/webmproject/libwebp
)
- Added
cancelAllDownloads
method toSDWebImageDownloader
#1504 - Added API to save image
NSData
to disk cache:[SDImageCache storeImageDataToDisk:forKey:]
#1453
- Fix #1449: Version 3.7.5 breaks semantic versioning (removes public API). Re-added
sd_setImageWithPreviousCachedImageWithURL:andPlaceholderImage:options:progress:completed:
and deprecated it. Will remove it in 4.0.0 b40124c - Fix
CGContextDrawImage: invalid context 0x0
- #1496 (fixes #1401 #1454 #1457) - Fix
CGBitmapContextCreateImage: invalid context 0x0
- #1464 (fixes #1423) - Fix changed image size when loading from disk #1540 (fixes #1437)
- Repair memory release in the iPad environment #1549 (had to switch
#if TARGET_OS_IPHONE
to#if TARGET_OS_IOS
) - Fixed completion logic in
MKAnnotationView+WebCache
#1547 - Optimize the decoder to avoid unwanted blended layer - #1527 (fixes #1524)
- Protect against malformed frame for GIFs - #1447
- updated doc: #1462 #1466 #1486 #1532 #1461
- fixed #1425 and #1426 - Continuation of Fix #1366, addresses #1350 and reverts a part of #1221 - from commit 6406d8e, the wrong usage of
dispatch_apply
- fixed #1422 - Added a fallback for #976 so that if there are images saved with the old format (no extension), they can still be loaded
- bumped
libwep
version to0.4.4
- added tvOS support #1327 and #1358 - fix #1368 and #1302
- #1217 contains several of the above fixes
- fix #391 -> option to cache only on Disk. will replace #1130
- fix #343 -> iCloud backup Option
- fix #371 -> CGBitmapContextCreate: unsupported parameter combination + #1268 #1412 #1340
- fix #576 -> scale set to screen scale
- fix #1035 -> progress queue with dispatch_async
- new feature -> activity indicator using auto layout. The activity indicator feature will replace #131
- #1218 progress callbacks now report on main thread - fixes #1035
- #1321 Added a new constructor to SDWebImagePrefetcher - replaces #956
- #976 append the original path extension to the hash filename - fixes #967
- replaced #999 with #1221
- added cache tests #1125
- #1236 fixes #1203
- bf899e2 fixes #1261 #1263 compilation issue CocoaPods vs non-CocoaPods
- #1367 fixes a bug where image scale & orientation are ignored when decoding / decompressing an image
- cac21e1 fixes #1366, addresses #1350 and reverts a part of #1221 - from commit 6406d8e, the wrong usage of dispatch_apply
- #1363 fixes #1361 sd_cancelBackgroundImageLoadForState
- #1348 Create a strong ref of weakOperation in the entry of The image download subOperation, use the strong ref instead weakOperation. At the same time, repair some logic of the 'If cancelled'
- dcb7985 replaces #1345 - Load local credential file
- #1323 don't to perform download if url is "" but not nil
- #1310 Added support for SDWebImageAvoidAutoSetImage option to UIButton and highlighted UIImageView categories
- #1308 Added Swift installation tips
- 32923fa Xcode 7.1 updates
- #1297 cleaner implementation of failedUrl error handling - fixes #1275
- #1280 Fix sd_animatedImageByScalingAndCroppingToSize
- Remove logging from the image prefetcher - #1276
- Fix typos #1256 #1257 #1258 #1331 #1290
-
Adds support for iOS 8+ Framework and Carthage #1071 #1081 #1101
-
[Refactor] Use
NSMutableSet
for failed URLs' storage instead of array #1076 -
Make a constant for the error domain #1011
-
Improve operation behavior #988
-
Bug fix:
Collection <__NSArrayM: > was mutated while being enumerated
#985 -
added
SDWebImageAvoidAutoSetImage
option to avoid automatic image addition inUIImageView
and let developer to do it himself #1188 -
Added support for custom disk cache folder with fall back for caches directory #1153
-
Added some files to the workspace so they are easier to edit 8431481
-
[Memory Issue] Clear
SDWebImagePrefetcher
progressBlock
when it has completed #1017 -
avoid warning
<Error>: ImageIO: CGImageSourceCreateWithData data parameter is nil
ifimageData
is nil 88ee3c6 #1018 -
allow override
diskCachePath
#1041 -
Use
__typeof(self)
when assigningweak
reference for block #1054 -
[Refactor] Implement cache cost calculation as a inline function #1075
-
Fix parenthesis to avoid crashes #1104
-
Add
NSCache
countLimit property #1140 -
failedURLs
can be removed at the appropriate time #1111 -
Purge
NSCache
on system memory notifications #1143 -
Determines at runtime is
UIApplication
is available as per #1082 #1085 -
Fixes http://git.chromium.org/webm/libwebp.git/info/refs not valid #1175 + Reverted #1193 + #1177
-
404 image url was causing the test to fail 0e761f4
-
Fix for transparency being lost in transformed images. #1121
-
Add handling for additional error codes that shouldn't be considered a permanent failure #1159
-
add webp accepted content type only if
WebP
enabled #1178 -
fix
ImageIO: CGImageSourceCreateWithData
data parameter is nil #1167 -
Applied patch for issue #1074 SDWebImage residing in swift module breaks the debugger #1138
-
Fixed URLs with trailing parameters get assigned an incorrect image scale value #1157 #1158
-
Add newline to avoid compiler warning in
WebImage.h
#1199
- bumped
libwep
version to0.4.3
- implement
SDWebImageDownloaderAllowInvalidSSLCertificates
option - #937 - flag to transform animated images (
SDWebImageTransformAnimatedImage
) - #703 - allows user to override default
SDWebImageDownloaderOperation
- #876 - adds option to decompress images and select prefetcher queue - #996
- fixed #809
cancelAll
crash - #838 - fixed #900 by adding a new flag
SD_LOG_NONE
that allows silencing the SD logs from the Prefetcher - fixed #895 unsafe setImage in
setImageWithURL:
- #896 - fix
NSNotificationCenter
dispatch on subthreads - #987 - fix
SDWebImageDownloader
threading issue - #1046 - fixed duplicate failed urls are added into
failedURLs
- #994 - increased default
maxConcurrentOperationCount
, fixes #527 - #897 - handle empty urls
NSArray
- #929 - decoding webp, depends on source image data alpha status - #936
- fix #610 display progressive jpeg issue - #840
- the code from
SDWebImageDownloaderOperation connection:didFailWithError:
should match the code fromconnectionDidFinishLoading:
. This fixes #872 - 7f39e5e 304 - Not Modified
HTTP status code handling - #942- cost compute fix - #941
- initialise
kPNGSignatureData
data - #981
- documentation updated
- fixed
sd_imageOrientationFromImageData:
crash if imageSource is nil - #819 #813 #808 #828 - temporary fix - fixed
SDWebImageCombinedOperation cancel
crash (also visible asSDWebImageManager cancelAll
) - 28109c4 #798 #809 - fixed duplicate symbols when using with webp via pods - #795
- fixed missing
mark
frompragma mark
- #827
- Add category for imageView's highlighted state
UIImageView+HighlightedWebCache
- #646 #765 - Keep a reference to the image URL - #560
- Pass imageURL in completedBlock - #770
- Implemented NTLM auth support. Replaced deprecated auth challenge methods from
NSURLConnectionDelegate
- #711 50c4d1d - Ability to suspend image downloaders
SDWebImageDownloader setSuspended:
- #734 - Delay the loading of the placeholder image until after load - #701
- Ability to save images to cache directly - #714
- Support for image orientation - #764
- Added async
SDImageCache removeImageForKey:withCompletion:
- #732 cd4b925 - Exposed cache paths - #339
- Exposed
SDWebImageManager cacheKeyForURL:
- 5fd21e5 - Exposing
SDWebImageManager
instance from theSDWebImagePrefetcher
class - 6c409cd SDWebImageManager
uses the shared instance ofSDWebImageDownloader
- 0772019- Refactor the cancel logic - #771 6d01e80 23874cd a6f11b3
- Added method
SDWebImageManager cachedImageExistsForURL:
to check if an image exists in either the disk OR the memory cache - #644 - Added option to use the cached image instead of the placeholder for
UIImageView
. Replaces #541 - #599 30f6726 - Created workspace + added unit tests target
- Updated documentation - #476 #384 #526 #376 a8f5627
- Fixed Xcode 6 builds - #741 0b47342
- Fixed
diskImageExistsWithKey:
deadlock - #625 6e4fbaf For consistency, added async methods inSDWebImageManager
cachedImageExistsForURL:completion:
anddiskImageExistsForURL:completion:
- Fixed race condition that causes cancellation of one download operation to stop a run loop that is now used for another download operation. Race is introduced through
performSelector:onThread:withObject:waitUntilDone:
- #698 - Fixed race condition between operation cancelation and loading finish - 39db378 #621 #783
- Fixed race condition in SDWebImageManager if one operation is cancelled - f080e38 #699
- Fixed issue where cancelled operations aren't removed from
runningOperations
- #68 - Should not add url to failedURLs when timeout, cancel and so on - #766 #707
- Fixed potential object mutated while being enumerated crash - #727 #728 (revert a threading fix from #727)
- Fixed
NSURLConnection
response statusCode not valid (e.g. 404), downloader never stops its runloop and hangs the operation queue - #735 - Fixed
SDWebImageRefreshCached
bug for large images - #744 - Added proper handling for
SDWebImageDownloaderLowPriority
- #713 #745 - Fixed fixing potential bug when sending a nil url for UIButton+WebCache - #761 #763
- Fixed issue #529 - if the
cacheKeyFilter
was set, this was ignored when computing thescaledImageForKey
. For most of the developers that did not setcacheKeyFilter
, the code will work exactly the same - eb91fdd - Returning error in setImage completedBlock if the url was nil. Added
dispatch_main_async_safe
macro - #505 af3e4f8 - Avoid premature completion of prefetcher if request fails - #751
- Return nil from
SDScaledImageForKey
if the input image is nil - #365 #750 - Do not load placeholder image if
SDWebImageDelayPlaceholder
option specified - #780 - Make sure we call the
startPrefetchingAtIndex:
method from main queue - #694 - Save image in cache before calling completion block - #700
- Fixed arm64 warnings - #685 #720 #721 #687
- Improved logging - #721
- Added
SDWebImageCompat.m
toSDWebImage+MKAnnotation
target
- Fix iOS 7 related issues
- Move
WebP
support to a dedicated target - Removed strong reference to
UIImageView
which was causing a crash in the nested block - Fix timeout issue
- Add some methods that allow to check if an image exists on disk without taking it off disk and decompressing it first
- Add
calculateSizeWithCompletionBlock
- Add multiple download of images for animationImages property of
UIImageView
- Add background task for disk cleanup #306
- Fix dead thread issue on iOS 5 #444, #399, #466
- Make IO operations cancelable to fix perf issue with heavy images #462
- Fix crash
Collection <__NSArrayM: ...> was mutated while being enumerated.
#471
- WebP image format support #410
- Animated GIF support #375
- Custom image cache search paths #156
- Bug fixes
SDWebImageRefreshCached
download option #326- New
SDWebImageManager
delegate methods ebd63a88c1 - Fix long standing issue with alpha en JPEGs #299
- Add synchronous disk-cache loading method #297
- Fix
SDWebImageCacheMemoryOnly
flag - Bug fixes
- Complete rewrite of the library using
GCD
,ARC
,NSCache
and blocks - Drop compatibility with iOS 3 and 4