Use png when your image has sharp corners (text, graphics, etc.).
Use jpg for photos etc…
They are two different formats made for different purposes. (You will get the block-artifacts in jpg when using sharp corners and high compression, using png for camera-pictures will create large files).
Or use a modern format like webp or jpgxl, but some devices don’t support these formats so most things online are still jpg/png.
And if you have a vector image instead of raster use svg
Use png when your image has sharp corners (text, graphics, etc.). Use jpg for photos etc…
They are two different formats made for different purposes. (You will get the block-artifacts in jpg when using sharp corners and high compression, using png for camera-pictures will create large files).
Or use a modern format like webp or jpgxl, but some devices don’t support these formats so most things online are still jpg/png.
And if you have a vector image instead of raster use svg