DEV Community

Discussion on: GitHub Profilator - Add GitHub profiles to Markdown in a snap

 
cicirello profile image
Vincent A. Cicirello

DEV might convert svg to png for security reasons. GitHub runs any SVGs that are embedded in READMEs through a sanitizer removing certain tags, etc that can potentially be abused. But GitHub serves them as is if you link to an SVG stored in a GitHub repo from a website. I'm thinking that DEV converts to png for the same reason just a different approach.

DEV may also convert to png as a spam mitigation. By converting to png, any links embedded in the svg will no longer be there. So a spammer attempting to sneak in backlinks on DEV can't do so with an svg. I know they recently posted about other spam mitigation they do. GitHub's svg sanitizer doesn't touch links in the svg.

DEV actually appears to host all images from posts themselves regardless of format, even png. I suspect this is also for spam mitigation. By hosting images themselves, they know they will continue to serve the images as originally seen at time of post, preventing spammer from making real-looking post and then later changing linked image to advertise something shady.