Abdullah bin Abbas reported,

I do not know whether the Messenger of Allah ﷺ forbade it because the donkeys were the people's means of transport and he disliked that their means of transport be lost, or whether he prohibited the flesh of domestic donkeys on the day of Khaybar.

Muslim 5017

Sahih

و حدثني أحمد بن يوسف الأزدي حدثنا عمر بن حفص بن غياث حدثنا أبي عن عاصم عن عامر

عن ابن عباس قال

لا أدري إنما نهى عنه رسول الله ﷺ من أجل أنه كان حمولة الناس فكره أن تذهب حمولتهم أو حرمه في يوم خيبر لحوم الحمر الأهلية

مسلم 5017صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Hunting, slaughtering, and what may be eaten of animals
Chapter
Prohibition of eating the meat of domestic donkeys
Numbering
Darussalam 5017
Muslim 5017