Embed image and video files from Google Drive

If you have any images or videos stored on Google Drive, you can directly embed them into your Jupyter notebook without downloading them locally and adding to the notebook file size.

First, you will need to update permissions for the file in Google Drive so anyone with the link to that file can see it. Follow the steps in the gif below to enable specific files to be embedded in the blog.

Google Drive Image Permissions

Once you have the public URL to the image, you can use that in a Markdown cell in the notebook as shown below.

![Google Drive Image](https://drive.google.com/uc?export=view&id=18h8kFxj1GciLEsvGMipzgo_hvRgJaR3S)

Google Drive Image

Alternatively you can use the Image tility from IPython.display module.

from IPython.display import Image
Image(url="https://drive.google.com/uc?export=view&id=18h8kFxj1GciLEsvGMipzgo_hvRgJaR3S")

You can also embed videos by using the Video utility.

from IPython.display import Video
Video("https://drive.google.com/uc?export=view&id=1fgAjTaSb5hGEIFnV7rDQdlV4kXogwjjK")