-
Notifications
You must be signed in to change notification settings - Fork 14
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
docs: added description image shrink #522
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Uploadcare Image Shrink | ||
|
||
<a href="https://uploadcare.com/?utm_source=github&utm_campaign=uploadcare-js-api-clients"> | ||
<img align="right" width="64" height="64" | ||
src="https://ucarecdn.com/edfdf045-34c0-4087-bbdd-e3834921f890/userpiccircletransparent.svg" | ||
alt=""> | ||
</a> | ||
|
||
File Uploader lets you accept hi-res images and shrink them in size to a reasonable resolution, keeping the original aspect ratio. See docs [here][uc-docs-image-shrink] wrapper to work with browser. | ||
|
||
[API Reference](https://uploadcare.github.io/uploadcare-js-api-clients/image-shrink/) | ||
|
||
[![Build Status][badge-build]][build-url] | ||
[![NPM version][npm-img]][npm-url] | ||
[![GitHub release][badge-release-img]][badge-release-url] | ||
[![Uploadcare stack on StackShare][badge-stack-img]][badge-stack-url] | ||
|
||
<!-- toc --> | ||
|
||
- [Install](#install) | ||
- [Usage](#usage) | ||
- [Security issues](#security-issues) | ||
- [Feedback](#feedback) | ||
|
||
<!-- tocstop --> | ||
|
||
## Install | ||
|
||
```bash | ||
npm install @uploadcare/image-shrink | ||
``` | ||
|
||
## Usage | ||
|
||
```typescript | ||
import { shrinkFile } from '@uploadcare/image-shrink' | ||
|
||
const shrinkedBlob = shrinkImage(blob, { | ||
size: number, | ||
quality?: number | ||
}) | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add some simple code example like |
||
|
||
## Security issues | ||
|
||
If you think you ran into something in Uploadcare libraries that might have | ||
security implications, please hit us up at | ||
[[email protected]][uc-email-bounty] or Hackerone. | ||
|
||
We'll contact you personally in a short time to fix an issue through co-op and | ||
prior to any public disclosure. | ||
|
||
## Feedback | ||
|
||
Issues and PRs are welcome. You can provide your feedback or drop us a support | ||
request at [[email protected]][uc-email-hello]. | ||
|
||
[uc-email-bounty]: mailto:[email protected] | ||
[uc-email-hello]: mailto:[email protected] | ||
[badge-stack-img]: https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat | ||
[badge-stack-url]: https://stackshare.io/uploadcare/stacks/ | ||
[badge-release-img]: https://img.shields.io/github/release/uploadcare/uploadcare-js-api-clients.svg | ||
[badge-release-url]: https://github.com/uploadcare/uploadcare-js-api-clients/releases | ||
[npm-img]: http://img.shields.io/npm/v/@uploadcare/signed-uploads.svg | ||
[npm-url]: https://www.npmjs.org/package/@uploadcare/signed-uploads | ||
[badge-build]: https://github.com/uploadcare/uploadcare-js-api-clients/actions/workflows/checks.yml/badge.svg | ||
[build-url]: https://github.com/uploadcare/uploadcare-js-api-clients/actions/workflows/checks.yml | ||
[uc-docs-image-shrink]: https://uploadcare.com/docs/file-uploader/feature-shrink/ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a link to the API refs, like the other packages have.