Leaving a deed because of people is showing off, doing a deed for people is shirk, and sincerity is that Allah frees you from both.
al-Fudayl ibn Iyad
al-Fudayl ibn Iyad

“Leaving a deed because of people is showing off, doing a deed for people is shirk, and sincerity is that Allah frees you from both.”

The explanation

What does al-Fudayl ibn Iyad mean?

Al-Fudayl ibn ‘Iyad (d. 187 AH / 803 CE) was a highway robber before he repented and became one of the great worshippers of Makkah. Al-Ghazali quotes this in the Ihya’ and Ibn al-Qayyim in Madarij as-Salikin, and its first clause is the one people forget: holding back from a good deed because others might see it is not humility — it is the same fault as doing it for them.

Written from Written from Al-Mukhtasar fi at-Tafsir and Tafsir Ibn Kathir.

Where it sits