Skip to content

Instantly share code, notes, and snippets.

View ozasadnyy's full-sized avatar
👨‍💻
working on something new

Oleh Zasadnyy ozasadnyy

👨‍💻
working on something new
View GitHub Profile
@ozasadnyy
ozasadnyy / firebase-function-image-optimization.js
Created November 1, 2017 10:44
Optimize images with Firebase Storage and Functions on a fly
'use strict';
const functions = require('firebase-functions');
const gcs = require('@google-cloud/storage')();
const spawn = require('child-process-promise').spawn;
const mkdirp = require('mkdirp-promise');
const path = require('path');
const os = require('os');
const fs = require('fs');