Giter Site home page Giter Site logo

filepond-plugin-image-crop's People

Contributors

davidrouyer avatar dependabot[bot] avatar raphaelgimenez avatar rikschennink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

filepond-plugin-image-crop's Issues

TIFF uploads are broken when plugin is active

The crop plugin seems to break TIFF uploads. When enabled and adding a TIFF file (image/tiff) I'm getting an "Uncaught (in promise)" error triggered on line 263. Could it be that loadImage(url).then(function(image) { cannot actually handle TIFF files?

Incorrect peer dependency

Hey guys. I've got this kind of warning just now.
How to reproduce:

yarn add filepond-plugin-image-crop

In results output:

warning " > [email protected]" has incorrect peer dependency "filepond@^3.0.0".

In the package.json of this plugin we have:

"peerDependencies": {"filepond": "^3.0.0"}

Which obviously (if there is no version related issues) should be changed to:

"peerDependencies": {"filepond": ">=3.x <5.x"}

Like in other plugins.

Option to turn off processing after setting crop

Background

I'm trying to integrate filepond in an existing project where there is a crop center being set externally. Practically, the image should not be cropped and so I don't have the transform plugin enabled. When the crop center is set, I call file.setImageCropCenter({...}) to reflect in the preview properly which works great.

Problem

The problem is that it also tries to upload the newly cropped image (which is not really cropped) to the server again. I understand why you would want this when coupled with the transform plugin but I just want the preview.

A few things I've tried:

  • Turning off instantUpload. I don't want this behavior though so this isn't an option
  • Checking the x & y positions in the process method and short circuiting if they both equal 0.5
    • This behavior isn't so bad but it seems really brittle

Proposal

Adding a flag like uploadOnCrop or something.

I'd be happy to submit a PR for this but I'm a little lost looking through the source code where the call to process is from this plugin ๐Ÿคท

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.