1

I understand you want to set a default image if there is no profile image and i suspect this issue is related to SPFx webpart. If so you may take a reference of below method: <img src={imagePath} onError={e=>{(e.target as any).src = defaultimg;}} alt='user photo'></img> More reference: https://stackoverflow.com/questions/38527759/how-to-check-...


Only top voted, non community-wiki answers of a minimum length are eligible