basic plumbing for image upload handling, not tested yet