It could very well be that what your server're returning isn't actually image data, and you can just paste the url into a browser and see if you get the image. There doesn't seem to be anything wrong with the code except for the lack of error-checking.
When you pass a non-image NSData into a +imageWithData message, you will get nil. You should probably check for that.