Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: compress proof image before upload #41

Merged
merged 3 commits into from
Dec 20, 2023

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented Dec 20, 2023

What

Use compressor.js to compress the proof image before uploading it to the backend.

Tested with 7.1 MB JPEG image --> 677 KB output

@raphodn raphodn self-assigned this Dec 20, 2023
@raphodn raphodn requested a review from raphael0202 December 20, 2023 15:28
checkOrientation: true, // default
retainExif: true,
quality: 0.6,
// mimeType: 'image/webp',
Copy link
Member Author

@raphodn raphodn Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raphael0202 I commented it out because I have issues when the config is set to webp: the image is compressed, and the output is displayed, but it is stored without an extension ("None" instead). It's probably due to the backend image mgmt, so we'll need a seperate PR to fix it ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done here ! #44

@raphodn raphodn merged commit 0d08220 into master Dec 20, 2023
@raphodn raphodn deleted the raphodn/proof-image-compress branch December 20, 2023 18:21
@raphodn raphodn linked an issue Dec 21, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Price form: compress proof images before upload
1 participant