Reformat URLs using Applescript or Automator
Assuming I'm understanding your question correctly, a simple program in any scripting language will do this in just a few lines of code.  Perl, Python, and Ruby are preinstalled on OS X; I'll give an example in Perl.  Just run this at the command prompt in a Terminal window.

Given that the filenames you want to process are listed, one filename per line, in a textfile called infile.txt:

perl -pe 's/(.*)/&lt;img&gt;$1&lt;\/img&gt;/;' &lt; infile.txt &gt; outfile.html


Explanation: Calling the perl executable with the -e flag means "run the code in quotes following"; the -p flag means "for every line on standard input, run the program (meaning the code in quotes in this case) on that line and then print the line"; and the actual program in single quotes merely adds the &lt;img&gt;&lt;/img&gt; tags at the beginning and end of whatever text is in that line of the file.  The &lt; and &gt; operators indicate input and output to the given filenames.