apoorv-2204
Is lossless image and PDF compression possible?
We have a service in production where we accept documents from users/clients
mainly: jpeg, png and pdf. And there are several of this file provided by client to fulfill the requirements.
The issues is when these files are needed to be send over email. with email size limit of 25 mb , the mail fails as of SendGrid services
I want to compress the incoming images png jpeg and pdf
But I don't want to loss quality, and they should be at least legible
What should I use what lib?
anything existing in elixir eco
Most Liked
benwilson512
You’ve got some solid answers in the compression front so I’ll do the other angle: see if you can change the requirement to allow links to files. There’s a reason companies that specialize in document sharing don’t email them, and instead do links.
kip
Images, including jpeg and png, already contain compressed data so I would be surprised if they will compress significantly to get you under the 25mb limit if you’re already over it. I typically find a compressed jpeg/png image is only about 10% smaller than the original image.
kip
Your original message says “lossless”. Higher jpeg/png compression (ie lower quality) is not lossless. Can you be a bit more specific about your requirements?
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









