---
title: "Comment by Sameet on \"On-the-fly image resizing with AWS Lambda, S3 & CloudFront\" | Hashnode"
description: "Hi Stefan, How could you change this to also change the images into a different format? Thanks"
url: "https://hashnode.com/posts/on-the-fly-image-resizing-with-aws-lambda-s3-and-cloudfront/61124f7efab8db0c4fc31a42/comment/63809f90e806cdee4ae93ffe"
---

[Discussion](https://hashnode.com/posts/on-the-fly-image-resizing-with-aws-lambda-s3-and-cloudfront/61124f7efab8db0c4fc31a42)

Comment [On-the-fly image resizing with AWS Lambda, S3 & CloudFront](https://hashnode.com/posts/on-the-fly-image-resizing-with-aws-lambda-s3-and-cloudfront/61124f7efab8db0c4fc31a42)

[Sameet](https://hashnode.com/@Sameet93)

[Nov 25, 2022](https://hashnode.com/posts/on-the-fly-image-resizing-with-aws-lambda-s3-and-cloudfront/61124f7efab8db0c4fc31a42/comment/63809f90e806cdee4ae93ffe)

Hi Stefan,

How could you change this to also change the images into a different format?

Thanks

[Stefan Olaru](https://hashnode.com/@stefanolaru)

[Nov 29, 2022](https://hashnode.com/posts/on-the-fly-image-resizing-with-aws-lambda-s3-and-cloudfront/61124f7efab8db0c4fc31a42/comment/63809f90e806cdee4ae93ffe#reply-6385e99d7faf6e3605f691a5)

Hi Sameet,

You'll have to tweak the code a bit, have a look at Sharp's output options: [sharp.pixelplumbing.com/api-output](https://sharp.pixelplumbing.com/api-output)
