solved console error on image upload