Few updates to the image resizing code.
Added image upload to the media library dialog. Also added image uploading to drag and drop image inserting.