fix code mode copy bug and reduce img size