next-js-image-optimization
dealmore/next-js-image-optimization/aws
A drop-in image optimization loader for Next.js image component powered by AWS Lambda.
Terraform Next.js Image Optimization module for AWS  A drop-in image optimization loader for the Next.js image component next/image. > Notice: If you look for a complete solution to host a Next.js application with Terraform on AWS, please check out our Terraform Next.js module for AWS. Features - ✅ Terraform v0.13+ - ✅ Serverless image processing powered by AWS Lambda - ✅ Powerful optimization using the sharp processing library - ✅ Performant image caching powered by Amazon CloudFront - ✅ Two-layer caching with CloudFront Origin Shield - ✅ Support for custom Device Sizes & Image Sizes Architecture The image optimization module is designed as a full stack AW
| Name | Type | Description | Default |
|---|---|---|---|
| next_image_image_sizes | list(number) | Allowed image sizes that should be used for image optimization. | required |
| source_bucket_id | string | When your static files are deployed to a Bucket (e.g. with Terraform Next.js) th | required |
| next_image_device_sizes | list(number) | Allowed device sizes that should be used for image optimization. | required |
| next_image_base_origin | string | Base URL where requests for absolute image paths should be resolved to. Should n | required |
| lambda_role_permissions_boundary | string | ARN of IAM policy that scopes aws_iam_role access for the lambda. | required |
| lambda_policy_json | string | Additional policy document as JSON to attach to the Lambda Function role. | "" |
| debug_use_local_packages | bool | (Debug) Use local packages instead of downloading them from npm. | false |
| lambda_memory_size | number | Amount of memory in MB the worker Lambda Function can use. Valid value between 1 | 1024 |
| lambda_attach_policy_json | bool | Controls whether lambda_policy_json should be added to IAM role for Lambda funct | false |
| cloudfront_origin_shield_region | string | Override the region choosen for the CloudFront origin shield. Use `auto` to auto | "auto" |
| deployment_name | string | Identifier for the deployment group (only lowercase alphanumeric characters and | "tf-next-image" |
| next_image_version | string | Next.js version from where you want to use the image optimizer from. Supports se | "12.0.10" |
| next_image_formats | list(string) | If the Accept head matches more than one of the configured formats, the first ma | [
"image/webp"
] |
| cloudfront_price_class | string | Price class for the CloudFront distribution. One of PriceClass_All, PriceClass_2 | "PriceClass_100" |
| cloudfront_enable_origin_shield | bool | Controls whether CloudFront Origin Shield should be enabled on the image optimiz | true |
| cloudfront_origin_id | string | Override the id for the custom CloudFront id. | "tf-next-image-optimizer" |
| next_image_domains | list(string) | Allowed origin domains that can be used for fetching images. | [] |
| cloudfront_create_distribution | bool | Controls whether a CloudFront distribution should be created. | true |
| lambda_timeout | number | Max amount of time the worker Lambda Function has to return a response in second | 30 |
| tags | map(string) | Tag metadata to label AWS resources that support tags. | {} |
cloudfront_cache_policy_id — Cache policy id used for image optimization.cloudfront_domain_name — Domain of the internal CloudFront distribution.cloudfront_hosted_zone_id — Zone id of the internal CloudFront distribution.cloudfront_origin_id — Id of the custom origin used for image optimization.cloudfront_origin — Predefined CloudFront origin. Can be used to embed the image optimizer into an existing CloudFront rcloudfront_cache_behavior — Predefined CloudFront cache behavior. Can be used to embed the image optimizer into an existing Cloucloudfront_origin_request_policy_id — Request policy id used for image optimization.Terraform module to deploy landing zone subscriptions (and much more) in Azure
Terraform Azure Verified Pattern Module for Azure Landing Zone
Terraform Azure Verified Resource Module for Key Vault
Terraform module for building and deploying Next.js apps to AWS. Supports SSR (L