Make Image Attributes easier to use from code

Saving an image attribute from code is a PITA because it requires a file object rather than a file ID. That makes it a special case when connecting post data to save into the attribute value. Rather than have to keep writing work rounds and special cases, this change makes an image attribute adaptive to save from a file object or a file ID.