Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug / Typo: 2nd deviceSizes should be imageSizes #53

Closed
danielgriese opened this issue Aug 5, 2021 · 1 comment · Fixed by #56
Closed

Bug / Typo: 2nd deviceSizes should be imageSizes #53

danielgriese opened this issue Aug 5, 2021 · 1 comment · Fixed by #56
Labels
bug Something isn't working
Milestone

Comments

@danielgriese
Copy link

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

@ofhouse
Copy link
Member

ofhouse commented Aug 5, 2021

Ah yes, good catch!
I will provide a fix for this in the next release (Since we follow the same versioning schema as Next.js we'll have to wait until a new version of Next.js is released).
Thanks for reporting!

@ofhouse ofhouse added the bug Something isn't working label Aug 5, 2021
@ofhouse ofhouse added this to the v11.0.2 milestone Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants