Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use google drive image inside css background-image: url() function?

I have an image on google drive and I would like to use that inside my html code. Image on Google Drive I give this url inside css background-image: url() but which is not loading the image.How can i fix this?.I'm added my snippet below.

#image-container{
  width:300px;
  height:300px;
  border:1px solid #000;
  background-image:url(https://drive.google.com/file/d/1BXGs4wvPdiz1JHoEuSkMMLbjaRN0od5a/view);
  background-repeat:no-repeat;
  background-size:100% 100%;
  }
<div id="image-container"></div>
like image 979
ADH - THE TECHIE GUY Avatar asked Mar 21 '26 13:03

ADH - THE TECHIE GUY


1 Answers

If you want to use file ID, how about this?

http://drive.google.com/uc?export=view&id=1BXGs4wvPdiz1JHoEuSkMMLbjaRN0od5a

Note :

  • If the image is not shared, the link gets to be not able to be used.
like image 103
Tanaike Avatar answered Mar 24 '26 01:03

Tanaike



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!