By the way, if a user disallow DM from other users he will not see any avatar in the likers list at the bottom of the posts ? It’s a quite unexpected behavior.
Oddly, when I first tried to reproduce the issue, I had the Discourse Reactions plugin enabled. With the Reactions plugin enabled, users can see the avatars of users who have liked their posts even if the user is not allowed to send them messages. That seems like the correct behavior to me.
With the Reactions plugin disabled, users cannot see the avatar of users who have liked their posts if the user who liked the post is not allowed to send them messages.