preg_match_all('#<a[^>]*href="([^>"]*/)?([^"]*.jpg)"[^>]*><img[^>]*src="([^>"]*/)?([^"]*.jpg)"[^>]*>#i', $Content, $imgs);
Would this pattern search for a .jpg image, that links to another .jpg image ? (a thumbnail to full sized version, for example ?)
I think I got it right, but I'm not possitive, and I don't have any test criteria readily available, which meets other criteria I have.