ah, well, that would be because I probably didn't give you the .htaccess file to use with it.
RewriteEngine On
RewriteCond %{REQUEST_URI} articles/.*\.html(\?.*)?
RewriteRule articles/(.*)\.html index.php?page=$1 [QSA,NC,L]
That is also assuming that you are using <img /> tags to display images and not using background images and such.
str_replace isn't less efficient, it's just that you specified images were in a subdirectory. If you wanted to replace all instances of "item1/" with "/articles/item1/" then str_replace would be sufficient; however, using preg_match it's a little more versatile since you can pear it down to what you really are looking for instead of keeping in vague and general.