I just had a client upload a jpg image to CMYK, and it didn’t display correctly in IE and some versions of firefox. Is there a check I can do to make sure it is saved in RGB before loading it?
You can use getimagesize(). http://php.net/manual/en/function.getimagesize.php
getimagesize()
$imgDetails = getimagesize('yourimage.jpg'); if ($imgDetails['channels'] === 4) { // CMYK } elseif ($imgDetails['channels'] === 3) { // RGB }