Giter Club home page Giter Club logo

horaceshmorace / image-flex Goto Github PK

View Code? Open in Web Editor NEW
120.0 120.0 40.0 292 KB

A robust, secure, and easily deployable image resizing service that scales, optimizes, and caches images on "the edge," on the fly, built on AWS Serverless technologies. Served by CloudFront via an Origin Access Identity. Executed on Lambda@Edge. Backed by S3. Protected by AWS WAF. Provisioned via CloudFormation. Deployed by the AWS SAM CLI.

License: Other

Shell 22.95% JavaScript 77.05%

image-flex's People

Contributors

diimpp avatar horaceshmorace avatar jeffbonnes avatar shelob9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

image-flex's Issues

VipsJpeg: Insufficient memory

Hi, I'm facing the following error with some images that are a little bit heavy, around 5MB. Did you face this error too? Or do you know a workaround for this? Unfortunately, the memory limit to lambda@edge is 256MB :(

{
    "errorType": "Error",
    "errorMessage": "VipsJpeg: Insufficient memory (case 4)\n",
    "stack": [
        "Error: VipsJpeg: Insufficient memory (case 4)",
        ""
    ]
}

Lambda end of support for Node.js 16

From AWS: We are ending support for Node.js 16 in Lambda on June 12, 2024. This follows Node.js 16 End-Of-Life (EOL) reached on September 11, 2023 [1].

I'm sure there would be a way to update this to work on Node 18+ with aws-sdk@2 packaged. But is there interest in upgrading to aws-sdk v3 ? I might have time to pull a PR together @HoraceShmorace - let me know if it would be helpful.

WAFv2 Creation Failed

Wafv2 only works with the stack deployed in us-east-1 only so trying to use the -- region won't work unless we move back to WAF v1 or WAF Regional.

Error if image is not in the bucket root

original URL: distribution/uploads/test.jpeg?w=200
Error while getting source image object "/uploadstest.jpeg": NoSuchKey: The specified key does not exist.

If the image is in the subfolder i get the following error how to fix it.

[Question] Why there is need to save processed images to another s3 instead of keeping it at CF cache?

Hi,

I'm curios why did you decide to save processed/optimized images to another s3 instead of keeping it at CloudFront cache?
What if I want to invalidate cache of the image, because content of some specific image changed without changing name/path?
Or if I deployed new version of the my AcmeImageFlex with different optimization rules and want to invalidate all webp images in the project.

So what would be benefit of using separate s3 to store processed images? At CF level I can create invalidation at least by file path.

On separate note, great solution, I've learned that much from it and in the process of integrating in our company's production. :)

AVIF?

can you add an AVIF handler to serve which ever image (AVIF, webp, etc..) is smaller in size?

Size Issue

Hie the solution is working great but rather I noted a huge growth in my page size after inspecting thoroughly I found out that if I upload a jpeg with 1200x800 size 88kb then try to resize it to ?w=500 the size actually grows from 88kb to 265kb when it is supposed to have gone down. I tried to change the sharp quality to less than 50 but did not change a thing. thank you bro please look into it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.