I have lot of questions in my mind on using sprites. I know that using sprites in a website can save lot of http requests and it make website faster.
But is it a good idea if I sprite every image I got on the website?
If no, then how should I decide which images to sprite and which to put in html?
Does it do any good to website if I put image in html?
During my research i found lots of modern and reputed websites using images in html instead of using them as sprites even if those images are just decorative.
Using sprites for Icons would be a big YES but what about using sprites for big images (for ex. 500px X 200px each)?
A common rule of thumb is if the images are just decoration (ie background, shadows and such) then you can put them in the css and make them sprites if you so wish. If they are informational or important to the content then you can use them as img.
Using sprites for large images isn’t a good idea because those images are usually a bit heavy in file size. Creating a sprite with them would make the site load very slowly. We’ve used sprites in the past for icons as they are small and save http requests. Today, we use icon fonts not just for file size but it is also easier to style and scale. Not to mention icon fonts are widely supported compared to SVG.