refactor image upload via plupload