infact you could simply duplicate the above code and make it also create the html file that holds the image at the same time
make another folder and add this
first the htacees ( a little different )
Code:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.html http://example.com/newexample/index.php?x=$1 [nc]
then make another index.php and put this in it
Code:
<?php
$wrd = $_GET['x'];
echo "<a href=http://example.com/example/$wrd.jpg>$wrd<br><img src=http://example.com/example/$wrd.jpg></a><add extra html here if you want>";
?>