Yes, very strange... anyway I saw that the difference is that GitHub sends to clients SVGs so they're rendered by you, instead as you said DEV.to may use a headless browser to "shoot" a photo of the SVG and replace it for better (old) devices compatibility...
This means there is no way to use chosen fonts on DEV.to without pre-render all text as SVG... I don't think I'll do this, since would be a big hard-coded effort and not so useful for the client and server loading/rendering time.
Anyway, thanks for the comments!
Feel free to contribute to my project (link on the article) if you want!
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes, very strange... anyway I saw that the difference is that GitHub sends to clients SVGs so they're rendered by you, instead as you said DEV.to may use a headless browser to "shoot" a photo of the SVG and replace it for better (old) devices compatibility...
This means there is no way to use chosen fonts on DEV.to without pre-render all text as SVG... I don't think I'll do this, since would be a big hard-coded effort and not so useful for the client and server loading/rendering time.
Anyway, thanks for the comments!
Feel free to contribute to my project (link on the article) if you want!
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.