question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pass quality to sharp

See original GitHub issue

How do I set the quality of an image? I’ve tried placing the “quality” key everywhere in the request object but no luck!

{"bucket":"bucket.name","key":"123123123_test.jpg","edits":{"resize":{"width":650,"height":650,"fit":"cover"},"grayscale":true, "quality" : 40}}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fabiovasinicommented, Jul 9, 2019

I tried to use "jpeg": { "quality": 60 } with a PNG image and the output is still a PNG. From the SharpJS API, there’s toFile key, so I tried "toFile": "output.jpeg" but it’s not working. Any idea?

1reaction
staykocommented, Jun 18, 2019

Great! Thanks @hayesry! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pass quality to sharp · Issue #104 · aws-solutions ...
I tried to use "jpeg": { "quality": 60 } with a PNG image and the output is still a PNG. From the SharpJS...
Read more >
Making your photos Sharp with the use of the High Pass Filter
Your camera needs to have sharp back with a good megapixel count, ... STEP 2: Duplicate that layer, and then go to Filter...
Read more >
How to ensure your photos are sharp
If all else fails, go ahead and perfect your shot in post-production. Using a High Pass filter in Photoshop is a great way...
Read more >
How To Process Images in Node.js With Sharp
To extract the metadata, you'll first import the sharp module, create an instance of sharp , and pass the image path as an...
Read more >
Processing images with sharp in Node.js
sharp converts large common image formats to smaller, web-friendly images. sharp can read JPEG, PNG, WebP, AVIF, TIFF, GIF, and SVG image ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found