Search code examples
iosobjective-cuiimageviewsdwebimage

Display Image from URL iOS


I am using SDWebImage to display an image from URL inside an UIIMageView. The issue is that my picture is not displayed while it works fine with other pictures from other servers.

This is my implementation:

[imageView sd_setImageWithURL:[NSURL URLWithString:product.imagePath]
        placeholderImage:[UIImage imageNamed:@"apple-iphone-6-128gb-gold.jpg"]];

It doesnt work with this image from this URL: http://www.swstelecom.fr/api/images/products/1111/614 but it works with this one: http://4.bp.blogspot.com/_hN-RNLUCt5Q/TSra3nOGmuI/AAAAAAAACZM/57j1rMTbPPs/Beautiful+love+wallpaper+3.jpg

Can anyone tell me why it doesnt work with the first image URL and how can I make it work, without making changes on the server, Because I dont have any control on server implementation.

PS: the picture is displayed fine on browser, so I dont understand what is the real problem here.


Solution

  • First link requires a login and password. The link should have ".jpg" or ".png" at the end of it.