image upload and resize method added