W
W
weranda2020-04-27 10:53:13
css
weranda, 2020-04-27 10:53:13

Use SVG or larger images for Retina displays?

Greetings.
I have never done separate images for displays with increased pixel density before - it looks normal anyway, sort of. I decided to do it, but now I don’t know which is better, for example, for a logo: a raster (png, webp) or a vector (SVG). With images, everything seems to be clear - I determined the value of devicePixelRatio with a script, added an additional class and set the necessary style rules. But with SVG, not everything is as simple as it seems to me. For me, there will be a lot of superfluous things in the page code (points, paths ...).
What do you recommend and why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ankhena, 2020-04-27
@weranda

Use SVG or larger images for Retina displays?

Yes!
:)
For bitmaps use <picture>(don't forget the polyfill for IE support) or the srcset.
Yes vector - SVG.
The logo is a vector image. Well, except for exceptional cases of curvature, we will not talk about them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question