the cropped file is copied from cicu_cropped folder to ajax_uploads folder. This copy gets corrupted because the source file is opened with r mode. I changed it to rb for binary treatment of image files.
open image file in binary mode in order to copy properly
removed hard-coded ids to make widget usable on more than 1 field per…
so much id hardcoding in this widget. unable to use more than 1 per page
Thank you for your contribution