0.18.2 • Published 5 months ago

@sladg/imaginex-lambda v0.18.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Imaginex

Pre-compiled Pythong lambda based on Pillow. Shares API with NextJS and is mainly meant as replacement of shitty build-in NextJS image optimizer.

However, can be plugged into any other project with straight forward API.

Currently supported image formats are PNG, JPEG, ICO, WEBP, GIF, TIFF, BMP and others based on the former formats supported by pillow package (e.g. - JPEG2000, JFIF, MPO, ...)

Usage

  • Import/download zips from this package,
  • Use them as lambda's code,
  • Allow lambda to access S3 bucket with images and set S3_BUCKET_NAME env variable,
  • Call lambda via API Gateway with query params:
    • url (relative to bucket or absolute to anywhere)
    • w (width for resizing) or h (height for resizing)
    • q (quality for optimizing)

Response is base64 encoded image.

Supports all formats supported by Pillow. Faster and easily deployable than NextJS image optimizer.

Notes

Only 3.8 python runtime is supported!

If you want to compile python modules for Lambda, make sure to set --platform manylinux2014_x86_64. It's important to set this in order to have compatible binaries in Lambda's execution environment.


Child directory of: http://github.com/sladg/nextjs-lambda

0.18.1

5 months ago

0.18.2

5 months ago

0.18.0

5 months ago

0.17.0

1 year ago

0.7.0

1 year ago

0.5.0

1 year ago

0.2.6

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.1.0

1 year ago