-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Hey!
First off great work and thanks for sharing your solution!
I used your setup as a reference to get the same thing running via serverless framework.
Whilst testing I encountered the issue that I was not able to generate images smaller than w=640, it would say "w" parameter (width) of 256 is not allowed even though it is a valid default imageSize.
Looking at the code I found the cause. Here, when using the defaults in case of missing envs, the second default should be imageSizes and not deviceSizes again.
https://github.com/dealmore/terraform-aws-next-js-image-optimization/blob/4de6dfb3b241d3a6d99d603e8b047cddaf1937cf/lib/handler.ts#L61
Just wanted to let you know in case anyone is using this without explicit envs and encounters this as well.
Thanks and kind regards,
Daniel