Abdullah bin Abbas reported,

This was revealed while the Messenger of Allah ﷺ was still in hiding at Makkah. Whenever he prayed with his companions he would raise his voice in reciting the Quran, and when the idolaters heard it they would revile the Quran, the One who sent it down, and the one who brought it. So Allah Most High said to His Prophet, "And do not be loud in your prayer" [Isra 17:110], meaning in your recitation, so that the idolaters hear it and revile the Quran, "nor be too quiet in it" [Isra 17:110], that is, from your companions, so that they cannot hear you, "but seek a way between that" [Isra 17:110].

Azami 2715

Sahih

في قوله تعالى: {ولا تجهر بصلاتك ولا تخافت بها} [سورة الكهف: ١١٠]

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

نزلت ورسول الله ﷺ مختف بمكة، كان إذا صلى بأصحابه رفع صوته بالقرآن، فإذا سمع المشركون سبوا القرآن، ومن أنزله، ومن جاء به فقال الله تعالى لنبيه: {ولا تجهر بصلاتك} أي بقراءتك، فيسمع المشركون فيسبوا القرآن {ولا تخافت بها} عن أصحابك فلا تسمعهم {وابتغ بين ذلك سبيلا}.

الأعظمي 2715صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Minor actions do not invalidate the prayer
Section
Reciting aloud and silently in the night prayer
Numbering
Jami al-Kamil 2715 (2nd edition)
Azami 2715