Modify image upload endpoint