Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8524693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:45:38+00:00 2026-06-11T07:45:38+00:00

I have a profile picture system which allows image cropping using jCrop. I’ve noticed

  • 0

I have a profile picture system which allows image cropping using jCrop. I’ve noticed if the user goes through the process a few times, the crop dimensions are not calculated properly simply because the previous image is still there. I’ve tried the destroy() method from the API , but that doesn’t clear the image source from the .jcrop-holder div and its child image element.

How can I get rid of this easily? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:45:40+00:00Added an answer on June 11, 2026 at 7:45 am

    I had a similar issue with an old version of jCrop and created a custom destroy function. Here is the gist of it:

    function crop_reset()
      {
      //Reset coordinates of thumbnail preview container
      $('#crop_preview').data("coords.x", 0);
      $('#crop_preview').data("coords.y", 0);
      $('#crop_preview').data("coords.w", 0);
      $('#crop_preview').data("coords.h", 0);
    
      //Reset src of jcrop img and copies bound to page specific full size and preview divs
      $("#crop, #crop_preview, .jcrop-holder img").attr("src", ""); 
      }
    
    function crop_start()
      {
      //Initialize and remove previous jCrop containers using load event callback
      $('#crop').Jcrop({
      onChange: showPreview,
      onSelect: showPreview,
      onLoad: hidePreview,
      aspectRatio: 1,
      setSelect: [0, 0, 50, 50],
      minSize: [50, 50],
      allowResize: false,
      allowMove: true
      },function(){$(".jcrop-holder").not(":last").remove();});
    
    
      //Remove previous jCrop containers using timer if callback is not supported
      /*
      window.setTimeout(function noblank(){
        $(".jcrop-holder").not(":last").remove();
        }, 1000);
      */
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Profile model, which has attached file picture, using Paperclip. I am
I have the following method, which basically tries to get the user profile picture
I have a user with a profile picture. The picture will be converted into
So, I have an imageview that should display an arbitrary image, a profile picture
I have an image upload script that allows simple PHP upload of profile pictures.
I have created an application which needs to have a profile box tab which
In my CakePHP 1.2.5 app, I have a Profile model that belongsTo a User
I have a profile image upload page, where users can overwrite their previous profile
How can I retrieve friends picture using graph api. I have manage to get
I m trying to make feed system for my website, in which i have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.