SDWebImage always load the placeholder image not the image from URL

sdwebimage not loading images
ios asynchronous image loading and caching swift
objective-c load image from url async
sdwebimage swiftui
image loading library ios
sdwebimage/webp swift
sdwebimage video thumbnail
sdwebimage framework

Um using the SDWeb image Here

and these my Code :

        UIImageView *sellerImage = [[UIImageView alloc]init];            
[sellerImage setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:productPicture]]
                        placeholderImage:[UIImage imageNamed:@"placeholder.png"]];

but it always load the placeholder image only not the image from URL, I've tried to use blocks to make sure if it load's the image or not and it enter to the Success Block which means that SDWebImage can load the image from URL but it doesn't change the place holder image.

These is the code When I tried to use blocks :

            [sellerImage setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:productPicture]]
                placeholderImage:[UIImage imageNamed:@"placeholder.png"]
                         success:^(UIImage *image, BOOL cached) 
        {
            NSLog(@"success Block");
        }
                         failure:^(NSError *error) 
        {
            NSLog(@"failure Block");
        }];

As I said it always goes in the success Block which means it can load the image from URL but it doesn't change the place holder image.

and these is a screen from my problem.

also try the following

[sellerImage setImageWithURL:[NSURL URLWithString:[productPicture stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]
                placeholderImage:[UIImage imageNamed:@"placeholder.png"]
                         success:^(UIImage *image, BOOL cached) 
        {
            dispatch_async(dispatch_get_main_queue(), ^{
                sellerImage.image = image;
            });
            NSLog(@"success Block");
        }
                         failure:^(NSError *error) 
        {
            NSLog(@"failure Block");
        }];

iphone, Could you please provide a sample GIF url, and use our demo or your own demo to reproduce this issue ? @dreampiggy I only use UIImageView, My project's SDWebImage version is Do not specify a zero frame before you load the image​. Always set a frame or using Autolayout on your imageView. Hi all, I have a problem with the PlaceHolder Image: I use the code exactly as shown in the readme here, so both imageurl and PlaceHolder Imagefilename are supplied. On first run my app of course shows the PlaceHolder and it's replaced a

try the following

UIImageView *sellerImage = [[UIImageView alloc]init];            
[sellerImage setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:
[productPicture stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]
placeholderImage:[UIImage imageNamed:@"placeholder.png"]];

SDWebImage, SDWebImageSwiftUI is a SwiftUI image loading framework, which based on SDWebImage. [x] Supports placeholder and detail options control for image loading as URL(string: "https://nokiatech.github.io/heif/content/images/ But unlike SwiftUI's Image which does not support animated image or vector  I run the demo project of our framework and just change one URL. The requwst timed out. Already show that it’s a network connect issue. Not about image decoding, not about loading logic inside SDWebImage.

Assign a placeholder image properly.. issue with me was with wrong image extension that doesn't match with each other i.e. placeholder.jpeg and palceholder@2x.jpg

iOS13 Image cannot be displayed, only the placeholder is displayed , SDWebImagePhotosPlugin - plugin to support loading images from Photos (​using URL(string: "http://www.domain.com/path/to/image.jpg"), placeholderImage: If not, you still need to add use_frameworks! to use SDWebImage as dynamic Using one global function to ensure we always sync all the UIImage category  The issue is that first cells of the TableView are displaying the placeholder image and not the remote image (even if it's cached), until I scroll up or down the TableView itself. The problem is that, when I have few cells I can't display any Image but only the placeholder. Are there any workaround?

SDWebImageSwiftUI Reference, A SDWebImage plugin to support Photos framework image loading. (when providing URL is definitely Photos URL but not HTTP URL), and another [​imageView sd_setImageWithURL:photosURL placeholderImage:nil If you need the raw image data for further image processing, you can always pass  Progressive image loading (including animated image, like GIF showing in Web browser) Thumbnail image decoding to save CPU && Memory for large images; Extendable image coder to support massive image format, like WebP; Full-stack solution for animated images which keep a balance between CPU && Memory

Package - SDWebImage/SDWebImage, SDWebImage - https://github.com/rs/SDWebImage ~Social Stuff~ Website - http://​www Duration: 17:52 Posted: 29 Sep 2016 The image and metadata is cacehd via SDWebImage, not LinkPresentation. The refresh does not handle, you can just pass SDWebImageRefreshCached option to make it always query network and works for HTTP Cache Control W3C standard. It's not a placeholder, it hit the cache, and that's. But you can use it as a placeholder, depends on you.

SDWebImage/SDWebImagePhotosPlugin: A SDWebImage plugin to , In fact, in the final analysis, it is not enough to do internal work. SDWebImage loads network images asynchronously. When the URL of an image is an incorrect link, or the server is abnormal, or the network is If the sandbox does not exist, the placeholder image is loaded onto the View first, and then  The next step would be to load a so-called ‘placeholder’ image before we actually load the original image. This ‘placeholder’ is a low-resolution variant of the original image.

Comments
  • Check this link. <stackoverflow.com/questions/15701556/…>
  • Use of undeclared identifier dispatch_get_main_queue
  • fixed. u can check it again.