googlearchive/friendlypix

Generating thumbnails using cloud functions

kitkatgithub opened this issue · 3 comments

There is a sample cloud function that generates a thumbnail for an image in Storage. Is there a reason why friendlyPix generates the thumbnail on client vs using the server-side function?

Yes: because this was built before Cloud Functions was available :) We could have changed it since then but haven't had time to get to it yet.

Doing this on the server is better because it will ensure that the thumbnail and the full image are the same. Currently a badly-intentioned user could in theory upload a different pic for the thumbnail and the full image.

Thank you @nicolasgarnier , this would be great to see!