A
A
Anya Knyazeva2020-06-24 12:55:52
User interface
Anya Knyazeva, 2020-06-24 12:55:52

Which is better for svg or png layout?

Can you please tell me what is the correct way to use an HTML page to insert small images?
I know that there are many image formats. But I want the pictures to take up little space when loading the page and display correctly if I suddenly need to scale this picture.
What is the difference between svg and png formats?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eduard07, 2020-06-24
@Eduard07

There is no difference for layout, but for optimization and for a beautiful picture, it is better to use svg ( sprite.svg ) for icons, and for pictures with webp / png alpha channels, and if without then webp / jpg

V
Vladimir Korotenko, 2020-06-24
@firedragon

What is a vector is svg, what is graphics is png or jpeg. In addition, set up a bundler, it will embed svg directly into the page if necessary and optimize graphics.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question