An artifact, or compression artifact, is a small distortion in a digital image, video, or audio file caused by a lossy compression algorithm. Artifacts occur when compression algorithms discard some of the original media data to create a lower-detail approximation of the original file. The inclusion of some artifacts into a media file is the cost of significantly reducing a file's size to make it use less bandwidth when downloading or streaming.
Lossy compression algorithms can achieve much greater reductions in file size than lossless algorithms, but they do so by removing data. For example, JPEG compression reduces an image's file size significantly but may introduce several types of artifacts — subtle blockiness, blurred details, and the dulling of bright colors. MPEG video files include similar artifacts, especially in dark areas with lots of movement.
You can tune a lossy compression algorithm to balance file size and quality. If you need to compress media further, it is best to restart from the original file and apply a different compression level. Applying a lossy compression algorithm to the same file multiple times will compound artifacts, making them more extreme with each generation.