title: How to set default image when imageURL is empty using SDWebImage - Swift
body: <p>I have the following code at <code>cellForRowAt</code> function: </p>
  
  <pre><code>    let url = URL(string: myurl!)
     cell.empPhoto.image? = (cell.empPhoto.image?.circle)!
     cell.empPhoto.image? = (cell.empPhoto.image?.rounded)!
  
      cell.empPhoto.sd_setImage(with: url)
  </code></pre>
  
  <p>I'm using <code>sd_setImage</code> from SDWebImage to download the image from url and cache it , but sometime the url is not found or has empty content, so how to give a default image for the cell if the url is empty , should I check the content of the url before using <code>sd_setImage</code> or I can just do it from the same library ?</p>
  
  <p>what I want is something like this : </p>
  
  <pre><code>     if url.hasImage {
         cell.empPhoto.sd_setImage(with: url)
       }
        else{ // use default image
          cell.empPhoto.image=UIImage(named: "contact")
       }
  </code></pre>