Added functional for uploading images