question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to init Croppie ?

See original GitHub issue

Hello!

Actual Behavior

I need to init your plugin but… i’ve always error : Uncaught Error: Croppie: Can't initialize croppie more than once Croppie is initialized once. I don’t understand this error…

Steps to Reproduce the Problem

Link: Codepen

  1. Load a random image and open your console.
  2. Error : Uncaught Error: Croppie: Can't initialize croppie more than once

Specifications

  • Browser: Chrome
  • Version: Version 71.0.3578.98 (Build officiel) (64 bits)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
thedustinsmithcommented, Jan 2, 2019

Let me be more specific. Change this:

        <div class="upload-demo-wrap">
          <div id="upload-demo" class="croppie-container"><div class="cr-boundary" aria-dropeffect="none"><canvas class="cr-image" alt="preview" aria-grabbed="false"></canvas><div class="cr-viewport cr-vp-circle" tabindex="0" style="width: 100px; height: 100px;"></div><div class="cr-overlay"></div></div><div class="cr-slider-wrap"><input class="cr-slider" type="range" step="0.0001" aria-label="zoom"></div></div>
        </div>

to this

<div id="upload-demo"></div>
0reactions
DjSeNaSscommented, Nov 23, 2020

Let me be more specific. Change this:

        <div class="upload-demo-wrap">
          <div id="upload-demo" class="croppie-container"><div class="cr-boundary" aria-dropeffect="none"><canvas class="cr-image" alt="preview" aria-grabbed="false"></canvas><div class="cr-viewport cr-vp-circle" tabindex="0" style="width: 100px; height: 100px;"></div><div class="cr-overlay"></div></div><div class="cr-slider-wrap"><input class="cr-slider" type="range" step="0.0001" aria-label="zoom"></div></div>
        </div>

to this

<div id="upload-demo"></div>

Omg thx you so much! I took the code in a old project and I searched for hours to make it work. It wans’t obvious that it was already “instanced” because there was html in the wrapper. It’s not the usual way to verify. Bless you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to init croppie several times? · Issue #482 - GitHub
Hello! I need to init and hide (or destroy) your plugin for current element. $('#someID').croppie({ viewport ...
Read more >
How to identify plugin (croppie or any other) initialized?
I use croppie for editing pictures before uploading. The task is to destroy and init again this plugin without reloading the page.
Read more >
Croppie - a simple javascript image cropper - Foliotek
Croppie is an easy to use javascript image cropper. ... You can initialize Croppie with the following code: var c = new Croppie(document....
Read more >
Crop Image with Croppie - Medium
There is two part. first part is setting up a input field to take input from user. A modal Which will be opened...
Read more >
test croppie - CodePen
<link href="css/croppie.css" rel="stylesheet" type="text/css">. 20. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found