In a dream it is a servant boy, a child or a wife. It may indicate travel or knowledge, because of His saying, Exalted is He:
مَثَلُ ٱلَّذِينَ حُمِّلُوا۟ ٱلتَّوْرَىٰةَ ثُمَّ لَمْ يَحْمِلُوهَا كَمَثَلِ ٱلْحِمَارِ يَحْمِلُ أَسْفَارًۢا ۚ بِئْسَ مَثَلُ ٱلْقَوْمِ ٱلَّذِينَ كَذَّبُوا۟ بِـَٔايَـٰتِ ٱللَّهِ ۚ وَٱللَّهُ لَا يَهْدِى ٱلْقَوْمَ ٱلظَّـٰلِمِينَ
“The example of those who were entrusted with the Torah and then did not take it on is like that of a donkey who carries volumes [of books]. Wretched is the example of the people who deny the signs of Allāh. And Allāh does not guide the wrongdoing people.”
Quran 62:5 · Saheeh International
(asfar, 'large books', resembling asfar, 'journeys'). Whoever finds his donkey different from what he is used to in waking life, and the dreamer is one of the God-fearing, it indicates his slackening in his worship.