JPEG is short for joint photographic experts group. JPEG is probably the best file type to use for saving space. JPEG is the file format you’re going to use most of the time because it can be compressed really well. The exceptions are if you need a vector file or transparency in the file.
PNG is really good for transparency and great at making crystal clear images for text and logos. Any picture or photo found online should be a JPEG.
Be careful when compressing or enlarging a JPEG. Image quality issues can arise, such as lossy “JPEG artifacting.” When you compress an image, as you set the JPEG quality lower, you actually tell it you want it to find blocks of color that are very similar that are near each other. A JPEG is a raster file type, and instead of having each pixel be its own color and take up memory in the file, a section of pixels will be scrutinized and grouped based on color.
For example, we’ll say this chunk of pixels is mostly blue, so all that section of pixels will be made blue, changing the image. Compressing the image makes it so that instead of writing down information for 72 PPI at a 20-inch image, it is only recording the data for about 60% of it and grouping stuff together for the rest.
So if you have a lot of similar colors near each other, they tend to be grouped together and create jagged edges.
To combat this issue, do not change JPEG image size. Use a photo at its full width and make sure to save the image at the correct size needed.