_pack_image requires utf-8 encoded filename