I have ShareX installed and configured to upload screenshots to Imgur (not Stack Imgur, for perhaps obvious reasons; just Imgur).
Chat likes to mangle those links by cutting the image hash part short. For example this image URL:
http://i.imgur.com/7zct02s.png
Gets rendered like so:
<a rel="nofollow" href="//i.imgur.com/7zct02.png">
<img src="http://i.imgur.com/7zct02s.png" class="user-image" alt="user image">
</a>
Chat notices that the hash ends with an s
(7zct02s) and thinks the link goes to the thumbnail version of the picture. It tries thus to be helpful and link to the actual picture. However, the thumbnail URL version is actually 7zct02ss. I believe it's likely that chat doesn't expect Imgur hashes to be 7 characters long, especially when most imgur images on chat are 5 character long stack.imgur hashes.
The same happens with m
, l
, t
and whatever other characters imgur uses to automagically resize pictures.
7zct02s
, we check for7zct02
; if that exists,7zct02s
is indeed the thumbnail of it, so we use it. Otherwise, we leave it alone.