My Jupyter Notebook has the following code to upload an image to Colab:
from google.colab import files
uploaded = files.upload()
I get prompted
Hack to upload image file in colab!
https://colab.research.google.com/
Following code loads image (file(s)) from local drive to colab.
from google.colab import files
from io import BytesIO
from PIL import Image
uploaded = files.upload()
im = Image.open(BytesIO(uploaded['Image_file_name.jpg']))
View the image in google colab notebook using following command:
import matplotlib.pyplot as plt
plt.imshow(im)
plt.show()