Animals will be resurrected on the Day of Judgment

Question
What will be the destiny of animals on the Day of Resurrection? Will the animals that were mentioned in the Quran, such as the hoopoe of Sulaymaan (Solomon ) and the dog of the Companions of the Cave be treated like other animals? Answer
Praise be to Allaah.

All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad, sallallahu 'alayhi wa sallam, is His slave and Messenger.
The texts of the Quran and the Sunnah indicate that animals will be resurrected and gathered on the Day of Judgment to retaliate against each other. Also, traditions mention that once animals retaliate against each other, Allah The Almighty will order them to turn to dust, and they will become dust.
Shaykh Al-Islam Ibn Taymiyyah mentioned that Allah The Almighty will gather all animals on the Day of Judgment, as proven by the Quran and the Sunnah. Allah The Almighty Says (what means): {And there is no creature on [or within] the earth or bird that flies with its wings except [that they are] communities like you. We have not neglected in the Register a thing. Then unto their Lord they will be gathered.} [Quran 6:38]
{And when the wild beasts are gathered.} [Quran 81:5]
{And of His signs is the creation of the heavens and earth and what He has dispersed throughout them of creatures. And He, for gathering them when He wills, is competent.} [Quran 42:29]
Moreover, there are many famous Hadeeths on this issue. The general indication of these Hadeeths is also that Allah The Almighty will gather all animals on the Day of Judgment to retaliate against each other. Then He will say to them: "Be dust," and they will become dust. This is the Day when the disbeliever will say: {Oh, I wish that I were dust!} [Quran 78:40]
Shaykh Al-Islam Ibn Taymiyyah also mentioned that a person who believes that animals will not be resurrected after death is absolutely wrong and is a deviant or a disbelieving person. The majority of evidence adduced by Shaykh Al-Islam Ibn Taymiyyah to support this opinion is narrated on the authority of Abu Hurayrah . [Al-Haakim, Ibn Abi Hatim, Ibn Al-Munthir and Ibn Jareer].
The Prophet , said that on the Day of Resurrection all rights will be given back to their owners and even animals will retaliate against each other. [Muslim] The same applies to the animals that were mentioned in the Quran, like the hoopoe of Sulaymaan (Solomon) and the dog of the Companions of the Cave, as there is no evidence suggesting that they are an exception.
Allah Knows best.
Reference Link