So viele Regex halte ich für etwas heftig! Würde eher zu einer Lösung in dieser Richtung tendieren:
	
Ist natürlich ungetestet, ist imho aber fixer!
							
						
					PHP-Code:
	
	
$search = '{image}';
$pos = 0;
foreach( $sim as $img ) {
   $pos = strpos( $code, $search, $pos );
   if( $pos===false ) {
      break;
   }
   $code = substr_replace ( $code, $img, $pos, $pos+7 );
   $pos += strlen( $img );
} 
 
          
Kommentar