Allow passing folder names as part of sourceBucket
, cacheBucket
settings (see #2).
import { createHandler } from "image-resizing";
export const img = functions.https.onRequest(createHandler({
// Where the source images are located.
// E.g. gs://s.example.com/uploads/image.jpg
sourceBucket: "gs://s.example.com/uploads",
// Where the transformed images needs to be stored.
// E.g. gs://storage.example.com/cache/image__w_80,h_60.jpg
cacheBucket: "gs://s.example.com/cache",
}));