I had this problem for quite long. Some websites allow us to upload only JPG, PNG and GIF files. When I upload something with only 2-3 colors in these formats the edges got very ugly and it's quite visible. It does not happen on my own website though, only on those that may re-format/resize my pictures. The same happens on Instagram, both on feed and profile picture.
Bad result here: