If any image found and bigger than thumbnail settings, get that one
Let me make it clear for myself. You have an array of images, which sometimes can be empty. You start off by checking the first image, if it's valid for your needs you take it, and if not you keep on checking the next one, and the next one, and so on until you find the one which is valid. Is that right? If so, here are my few thoughts. 

Firstly, I must say that Glenn has made good points, namely: 1) factor the common code in all cases out to a separate function, and 2) if you have nested conditionals, most times it's better and more readable to replace it with Guard Clauses.
However, personally I would prefer the following solution:

$theImg = null;
$i = 0;
while (!empty($matches[1][$i])) {
    $imgAtHand = $matches[1][$i];
    $dimensions = getimagesize($imgAtHand);
    if (($dimensions[0] &gt; $width) &amp;&amp; ($dimensions[1] &gt; $height)) {
        $theImg = $imgAtHand;
        break;
    }
    $i++;
}


It has a couple of advantages over the "nested conditional" approach:


it eliminates code duplication;
it will work regardless of the array size.


One more thing. The following piece of code

isset($matches) &amp;&amp; !empty($matches[1][0])


may well be replaced with

!empty($matches[1][0])


to make the code less verbose.