Host images via Google Drive

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
Search for a command to run...

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
Awesome, looking to do some more on the drive API
Most of you know me for my consistency, a golden arrow in my blog series. I've written 1000 articles in 1008 days! Almost an article a day, and my honeymoon was the only holiday I ever took. I'm super proud of this achievement; it has been a fantasti...

It's not the first time I'll be talking about community. I think it's an essential aspect of any successful tool. This shows in my previous explorations of Astro, Medusa, and now Vendure as well. All these products thrive in a super open, welcoming, ...

The cool part about Vendure is how easy it is to set up and how abstract each layer is. Basically, we get the following elements: External database Server Worker Admin UI Frontend While this is amazing, it also brings a bit of complexity when it co...

The previous article looked at customizing Vendure on a data and process level. In this article, we'll look at customizing emails, as they are often a big part of a webshop system. We'll be looking at two different layers of customization for customi...

Even though Vendure is a pretty significant project out of the box, in some cases, we might want to go in and modify some elements to work to our specific use case. In this article, I'll take a high-level look at some elements we can customize within...

The other day I was playing around with some image effects and needed a place to serve them from an online place.
Don't get me wrong I know there are many tools and websites to do this for you. Yet I learned that Google Drive can also be one of these options.
As a person who owns unlimited storage, it was worthwhile giving it a go.
So today I'll be showing you how to host images on Google Drive and have them available for everyone.
Firstly open your Google drive and upload an image.
For this purpose, it doesn't matter if it's in a folder or not.

That's part one, now we can click the picture and select the sharing option.

I changed the option to everyone with the link just to be on the safe side, you'll get a link like this:
https://drive.google.com/file/d/10YD7sJI_HHDXmQM4h96alvyGIU53nGYZ/view?usp=sharing
The part after the /d/ is what we are looking for, as it's the unique ID of the image.
We can copy the unique ID and paste it into the following URL.
https://drive.google.com/uc?id={ID}
So in our case, we get a link like this:
https://drive.google.com/uc?id=10YD7sJI_HHDXmQM4h96alvyGIU53nGYZ
And we are able to use the image as such:
And that's it, you're now able to use your Google Drive as a way of hosting images for you.
Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter