Comments (5)
@anmolagar Hi. Thanks for the report.
The Photos Plugin is just a loader, to load the normal UIImage
stored in the iOS device photos library. Therefore the image in the completionBlock
is always actually the UIImage
class but not something like SDAnimatedImage
for animation.
Could you please help me provide some extra information ? For example, how do you register the Photos Loader during image loading ? Did you assign it into the shared manager to using the context option to just use a single manager ?
SDWebImageManager *manager = [[SDWebImageManager alloc] initWithCache:SDImageCache.sharedCache loader:SDWebImagePhotosLoader.sharedLoader];
[imageView sd_setImageWithURL:photosURL placeholderImage:nil context:@{SDWebImageCustomManager: manager}];
And, could you please add a completionBlock for sd_setImageWithURL:
method, in the completionBlock, check the image
arg, is that valid ?
[cell.customImageView sd_setImageWithURL:self.objects[indexPath.row]
placeholderImage:placeholderImage
options:SDWebImageFromLoaderOnly
context:@{SDWebImageContextStoreCacheType : @(SDImageCacheTypeNone)}
progress:nil
completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
// Debug or log to check whether the image is valid ?
NSParameterAssert(image);
}];
from sdwebimagephotosplugin.
@anmolagar Our demo also use SDAnimatedImageView
, could you try to clone and modify the code to simulate your use case, and test whether this issue can be reproduced ?
from sdwebimagephotosplugin.
Hi @dreampiggy ,
My project has both the use case of getting images from Photo library as well as getting from the web. So I am wondering, could this be a conflicting scenario?
from sdwebimagephotosplugin.
@anmolagar See the readme again. I update the step-by-step tutorial about how to register loader for SDWebImageManager
based on two different use cases.
https://github.com/SDWebImage/SDWebImagePhotosPlugin#usage
Actually it's not so magic, you should use the loader manager (multiple loaders) to register both SDWebImageDownloader
&& SDWebImagePhotosLoader
, then all things done :)
from sdwebimagephotosplugin.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from sdwebimagephotosplugin.
Related Issues (14)
- Request completion block HOT 2
- Extremely high memory usage and slow scrolling HOT 3
- Support for URL instead of NSURL HOT 5
- unsupported URL HOT 6
- Is it possible to have SDWebImagePhotosPlugin work with SDWebImage v.5.10.X using SPM? HOT 1
- I am seeing the same issue using SDWebImage version 5.3.2, cocoapods, Xcode 12. Crashes are appearing on iOS 14+, does not appear to be happening below iOS 14. HOT 2
- Github HOT 1
- Carthage build failed HOT 1
- reloaddata causes image flickering
- Test issue without template HOT 3
- Support for SDWebImage 4.X HOT 3
- Crashed with beta4 and beta6 HOT 6
- Only support image HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdwebimagephotosplugin.