Something like this should do:
// All resolutions that you want to generate
$resolutions = [[1920,1200],[1680,1050],[1440,900],[1280,800]];
// Current image dimensions
list($width, $height) = getimagesize('path/to/image.jpg');
foreach ($resolutions as $res) {
if ($width <= $res[0] || $height <= $res[1]) continue;
// logic to generate images at different resolutions
}
The idea is to loop and skip until the dimensions fall within the specified range, then generate the different images based on the remaining resolutions.
This works better if the aspect ratio is the same for all images, so you might need to adjust it or maybe just check the width.
Edit: You could also reverse the array and loop from low res to high res and use break
with the inverse condition.