Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Layout of Google Cloud Function to resize images
exports.resizeImages = function resizeImages(event, callback) {
var uri = `gs://${}/${}`; // Grab a hold of the dropped image
// Logic to resize and store back in bucket
// On error call callback like callback("Error description", null)
// On success call callback like (null, "Image processing done")
// Callback is in errback format
callback(null, "Image processing done")

This comment has been minimized.

Copy link
Owner Author

@divyenduz divyenduz commented Aug 27, 2017

Please let me know if anyone lands on this from Google because SEO and failed to find the actual image resize logic. I will update this and add an actual example.

This is me lazy-doing stuff like Haskell.


This comment has been minimized.

Copy link

@beatgeek beatgeek commented Apr 19, 2018

YEah I landed here from Google Search. Looking at debugging our trigger with emulator. It's turning it more of pain than I imagined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment