10

When initially loading my website, I need to load a couple of images from my Google cloud storage that have been uploaded by users. To speed up my load time, I would like to get the images in lower resolution.

Is there a way to specify this with the URL, like an additional URL parameter?...

I'm using signed URLs that look like this:

baseURL + "?GoogleAccessId=" + GoogleAccessStorageId + "&Expires=" + Expiration + "&Signature=" + UrlEncodedSignature

as specified here: https://cloud.google.com/storage/docs/access-control#Signed-URLs

1 Answer 1

10

Not directly, no. AppEngine has an Images API that can serve images from GCS, and that image serving can include transformations, but GCS itself is agnostic to the type of objects it is storing and has no special knowledge of image files or transforming them.

One option would be storing a smaller version of each image at the time that you upload the original. Then you may simply refer to that object directly. A second option would be to serve the images through AppEngine in order to take advantage of its Images API.

1
  • 3
    I also thought about storing multiple versions, but wanted to avoid that if possible... The Images API looks great, but - as I'm not familiar with Python - is there any chance this can be done in Node.js (anytime soon)?
    – kolli
    Mar 16, 2016 at 10:23

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.