What are the potential drawbacks of using high compression values in imagejpeg for JPEG images?

Using high compression values in imagejpeg for JPEG images can result in loss of image quality, leading to artifacts such as blurriness and pixelation. It can also increase the file size of the image, making it slower to load on web pages. To avoid these drawbacks, it is recommended to find a balance between compression and image quality to achieve the best results.

// Set the compression level to a moderate value (e.g. 75) to balance between image quality and file size
imagejpeg($image, 'output.jpg', 75);