Other answers are valid, but not so straightforward, IMHO. So here is a very simple solution, as of 2020.

1. Use the following link: `https://stackexchange.com/users/flair/2778822.png?theme=dark&latest` *(using `latest` keeps it up to date)*
1. Replace `2778822` by your SO ID, found on your profile https://meta.stackoverflow.com/users/flair
1. (optional) Change the `theme` parameter (accepted values are listed on the previous link)
1. Use this link in your LinkedIn "About" section, as Link
1. I personally used `StackOverflow - Moderator - Top 3%` as link's "Title", but you can use anything you like

---

Example with my LinkedIn profile:
https://www.linkedin.com/in/ambroise-dhenain/

[![enter image description here][1]][1]

---

> Here is what the "edit media" view looks like, as of 2020:

[![enter image description here][2]][2]


  [1]: https://i.sstatic.net/7DKJz.png
  [2]: https://i.sstatic.net/RXgmu.png