How can the image quality parameter be adjusted in the ImageJPEG() function to improve thumbnail quality?

To improve thumbnail quality in the ImageJPEG() function, the image quality parameter can be adjusted by increasing the value to a higher number. This will result in a higher quality image with less compression artifacts. A value of 100 is the maximum quality setting.

// Set the image quality parameter to 100 for maximum quality
imagejpeg($image, 'thumbnail.jpg', 100);