title: Error when trying to save image in NSUserDefaults using Swift
body: <p>When i try to save an image in NSUserDefaults, the app crashed with this error.</p>
  
  <p>Why? Is it possible to save an image with NSUserDefaults? If not, then how do I save the image?</p>
  
  <p>Image...</p>
  
  <p><img src="https://i.stack.imgur.com/0h9sk.png" alt="Xcode error"></p>
  
  <p>Code...</p>
  
  <pre><code>var image1:UIImage = image1
  
  var save1: NSUserDefaults = NSUserDefaults.standardUserDefaults()
  
  save1.setObject(Info.Image1, forKey: "Image1")       
  
  save1.synchronize()
  </code></pre>
  
  <p>Log error...</p>
  
  <blockquote>
    <p>libc++abi.dylib: terminating with uncaught exception of type NSException
    (lldb) </p>
  </blockquote>