- Updated image upload and saving function.