What are the differences between image/jpg, image/jpeg, and image/pjpeg MIME types in PHP file handling?
The differences between image/jpg, image/jpeg, and image/pjpeg MIME types in PHP file handling are minimal. All three MIME types are commonly used for JPEG image files. However, image/jpg is not an official MIME type and may not be recognized by all browsers or servers. It is recommended to use image/jpeg as the standard MIME type for JPEG images. Image/pjpeg is an outdated MIME type that was used to optimize JPEG images for progressive loading in older browsers.
// Set the MIME type to image/jpeg for JPEG image files
header('Content-Type: image/jpeg');