4

An answer to a quesiton over here has worked perfectly for me to allow anonymous users to view pictures from my google drive.

The instructions are to form a url as so:

https://drive.google.com/uc?export=download&id={fileId}

Where fileId is the identifier of a publicly viewable file in one's google drive.

This works great! However the images I've uploaded are very large (megabytes). I'd like to get a link to lower resolution images so that users aren't downloading several megabytes upon loading pages I display these images on.

I've tried tacking on GET parameters "w" "width" "h" and "height", and using a little sizing trick I've seen elsewhere in google's interface. Nothing has worked thus far.

https://drive.google.com/uc?export=download&id={fileId}=w{widthpx}-h{heightpx}

I haven't been able to find google documentation for this endpoint nor any help for getting lower resolutions images by googling and searching stackoverflow.

Is there a way to specify resolution to this endpoint (or another that works for obtaining displayable images), or must I upload separate lower-res images for each image I upload?

Community
  • 1
  • 1
joshterrell805
  • 1,407
  • 2
  • 11
  • 13

1 Answers1

-1

I'm using the API as a solution for now. If anyone finds another solution I'd love to hear it.

https://github.com/joshterrell805/gDriveScaledImages

joshterrell805
  • 1,407
  • 2
  • 11
  • 13