check image before insert to editor