Consolidate image uploading functions.