Skip to content

Commit

Permalink
Change default result format to webp
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorejb committed Nov 7, 2023
1 parent fe0dee0 commit 719d9fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
20 changes: 0 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


## To Install
Bower: `bower install croppie`

Npm: `npm install croppie`

Expand All @@ -22,28 +21,9 @@ https://cdnjs.cloudflare.com/ajax/libs/croppie/{version}/croppie.min.css
https://cdnjs.cloudflare.com/ajax/libs/croppie/{version}/croppie.min.js
```


## Documentation
[Documentation](http://foliotek.github.io/Croppie#documentation)

## Related Libraries
* [croppie-dart](https://gitlab.com/michel.werren/croppie-dart)
* [ngCroppie](https://github.com/allenRoyston/ngCroppie)
* [angular-croppie](https://github.com/lpsBetty/angular-croppie)
* [django-croppie](https://github.com/dima-kov/django-croppie)
* [vue-croppie](https://github.com/jofftiquez/vue-croppie)

## Contributing
First, thanks for contributing. This project is difficult to maintain with one person. Here's a "checklist" of things to remember when contributing to croppie.
* Don't forget to update the documentation.
* If you're adding a new option/event/method, try adding to an example on the documentation. Or create a new example, if you feel the need.
* We don't have tests for Croppie :( (if you want to create tests I'd be forever grateful), so please try to test the functionality you're changing on the demo page. I've tried to add as many use-cases as I can think of on there. Compare the functionality in your branch to the one on the official page. If they all still work, then great!

If you're looking for a simple server to load the demo page, I use https://github.com/tapio/live-server.

#### Minifying
`uglifyjs croppie.js -c -m -r '$,require,exports' -o croppie.min.js`

#### Releasing a new version
For the most part, you shouldn't worry about these steps unless you're the one handling the release. Please don't bump the release and don't minify/uglify in a PR. That just creates merge conflicts when merging. Those steps will be performed when the release is created.
1. Bump version in croppie.js
Expand Down
2 changes: 1 addition & 1 deletion croppie.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class Croppie {
result(options) {
var RESULT_DEFAULTS = {
type: 'base64',
format: 'png',
format: 'webp',
quality: 1
};
var RESULT_FORMATS = ['jpeg', 'webp', 'png'];
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ <h3>Options</h3>
type: 'square'
}</code>
<br /><br />
<span class="default">Valid type values:</span><code class="language-javascript">'square' | 'circle'</code>
<span class="default">Valid values:</span><code class="language-javascript">'square' | 'circle'</code>
</li>
</ul>
</section>
Expand Down Expand Up @@ -196,7 +196,7 @@ <h3>Methods</h3>
<code class="language-javascript">format</code> Indicating the image format.
</li>
<li class="values">
<span class="default">Default:</span><code class="language-javascript">'png'</code>
<span class="default">Default:</span><code class="language-javascript">'webp'</code>
</li>
<li class="values">
<span class="default">Valid values:</span><code class="language-javascript">'jpeg' | 'png' | 'webp'</code>
Expand Down

0 comments on commit 719d9fa

Please sign in to comment.