It doesn't matter what you scan them as, just make it as small as possible. If you don't need to search for text on it, than png or jpegs will probably be smaller.
Since you won't be scanning with PHP anyways, you simply accept the upload for whatever filetypes you want. Scanning in PHP is a mess to do, so it'd be much easier to use C++, C# or even Java to do it.
header('HTTP/1.1 420 Enhance Your Calm');