Skip to content

Cloud Image Resizing v0.1.2

Latest
Compare
Choose a tag to compare
@koistya koistya released this 04 Oct 12:24
· 1 commit to main since this release
2d08adc

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",
}));