diff --git a/pkg/platform/src/components/aws/ssr-site.ts b/pkg/platform/src/components/aws/ssr-site.ts index f6ae7f830..ff515b5fe 100644 --- a/pkg/platform/src/components/aws/ssr-site.ts +++ b/pkg/platform/src/components/aws/ssr-site.ts @@ -107,6 +107,10 @@ export interface SsrSiteArgs extends BaseSsrSiteArgs { * resources. */ transform?: { + /** + * Transform the function used for optimizing images. + */ + imageOptimization?: Transform; /** * Transform the Bucket resource used for uploading the assets. */ @@ -569,7 +573,7 @@ function handler(event) { ) { const fn = new Function( `${name}${sanitizeToPascalCase(fnName)}`, - { + transform(args.transform?.imageOptimization, { timeout: "25 seconds", logging: { retention: "3 days", @@ -585,7 +589,7 @@ function handler(event) { live: false, _ignoreCodeChanges: $dev, _skipMetadata: true, - }, + }), { parent }, );