Newbie here,
Could someone explain to me the best solution for implementing graphics into a web page?
For example icons next to paragraphs of text, or designs in the background of a website.
Would you use vector graphics? Or JPEGs with low file sizes?
>>252715
SVG if the art is vector, otherwise 72dpi png for flat graphic stuff and 72dpi jpeg for photos/detailed illustration
SVG will always look the nicest if you have vector options since it scales. 72dpi png and jpeg look good on most screens except retina ones so 144dpi might be ok if you care about sharpness and don't have a ton of images for your user to download/view.
many ways to optimize the file sizes for web graphics as well, varies by file type usually.
>>252717
Summed it all up.
/thread
You also may want to look into creating an icon font.
>>252715
Also, you might want to learn how to use CSS Sprites to reduce the amount of HTTP Requests.
use SVG, every modern browser supports it and you can manipulate it with JS and CSS
also, compress the files with this:
https://jakearchibald.github.io/svgomg/