It has to be a direct link to the actual image file, and you have to change https to http.
For instance, in imgur you can click on Get Share Links and you'll see several options.
One is called a Share Link and it looks like this:
https://imgur.com/gtKxDkfThat won't work because it's not a direct link to the actual image.
The one you want is the BBCode (Forums) link, which will look like this:
[img]https://i.imgur.com/gtKxDkf.jpg[/img]
You will need to remove the img and the brackets and change the https to http until you're left with this:
http://i.imgur.com/gtKxDkf.jpg
Then you can use it as your avatar.