This is a beta service with low rate limits. Contact us for next steps!
March 12, 2024: Now supporting files larger than 10 MB!

Embed your Google DriveTM files directly in your website.

In 2024, Google DriveTM stopped allowing user to embed files directly in their websites.

With our service, you can keep the files in your Google DriveTM and get better performance with a Global CDN.

Your Website

Quickly embed Google DriveTM images and audio files on your website

Try it now

Loading editor...

<img
 crossorigin="anonymous"
 src="https://drive.lienuc.com/uc?id=18q95H4slpt6sgtkbEoq6m9rppCb-GAEX"
 alt="demo"
/>

<audio controls crossorigin="anonymous">
  <source src="https://drive.lienuc.com/uc?id=1wjsgJusecGLRXARmGZv-KKv7ELRfEifM">
</audio>

Output

demo

How it works

We use the Google Drive API to fetch your publicly shared files and serve them behind a Global CDN with Cloudflare Workers.

This isn't free for us, so we charge a small fee to cover our costs. You benefit from better performance and a simple interface for embedding everything from HTML, CSS, JavaScript, images, GIFs, and audio files.

Limitations

At this time we only support publicly shared files. If you want to restrict access, please contact us about custom solutions.

In 2024, Google DriveTM started returning 403 Forbidden for links in the format of https://drive.google.com/uc?export=download&id=. This functionally made it impossible to embed Google DriveTM images and other files in your website. Read more in the issue tracker.

Lienuc provides a solution and here are the steps to migrate:

  1. Change the domain to https://drive.lienuc.com.
  2. Add crossorigin="anonymous". The attribute value means there is no exchange of user credentials.
  3. (Optional) - Remove export=download or other variations.

Below are the changes required to embed Google Drive image files.

<img
- src="https://drive.google.com/uc?id=YOUR_FILE_ID&export=download"
+ crossorigin="anonymous"
+ src="https://drive.lienuc.com/uc?id=YOUR_FILE_ID"
alt=""
/>

Below are the changes required to embed Google Drive JavaScript files.

<script
- src="https://drive.google.com/uc?id=YOUR_FILE_ID"
+ crossorigin="anonymous"
+ src="https://drive.lienuc.com/uc?id=YOUR_FILE_ID"
></script>

Below are the changes required to embed Google Drive audio files. Audio files, such as mp3s, require a crossorigin attribute on the audio tag.

<audio
+ crossorigin="anonymous"
controls>
- <source src="https://drive.google.com/uc?id=YOUR_FILE_ID&export=download">
+ <source src="https://drive.lienuc.com/uc?id=YOUR_FILE_ID">
</audio>

Below are the changes required to embed Google Drive video files. Video files require a crossorigin attribute on the video tag.

<video
+ crossorigin="anonymous"
controls>
- <source src="https://drive.google.com/uc?id=YOUR_FILE_ID&export=download">
+ <source src="https://drive.lienuc.com/uc?id=YOUR_FILE_ID">
</video>

Repeat this pattern to embed other Google DriveTM file types on your website. Contact us hi@lienuc.com for support.