DEV Community

Discussion on: PNG Sprites perform a lot better than SVG (Reports Attached)

 
svaani profile image
Vani Shivanand • Edited

Yes, but if it is available as HTML then it is already rendered on browser page which adds a few more components to the DOM causing a "layout" cost. Personally, I wouldn't prefer to have the elements on the page that are not rendered.

Even if we create an SVG sprite and cache it, we have to render the svg sprite as an HTML.

Saying that, if the website is not icon intensive, it doesn't add a big performance gap. So, we need to bother about this only when we have significant number of icons in our app.

Thread Thread
 
svaani profile image
Vani Shivanand • Edited

That is the reason why flaticons website chooses to preview with png instead of svg by default
Alt text of image