JPG (or JPEG) and PNG are both raster image formats, meaning they are both pixel-based. However, there are important differences between the two file types.
One of these differences is image compression. JPG files use what is known as “lossy compression”. This means that every time you edit and re-save the picture, it loses some image quality.
On the other hand, PNG files use “lossless” compression. As a result, they maintain image resolution even after editing.
Unlike JPG files, PNG files also support transparency, making them easier to use in graphic design.