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
perl -pe 's/(.*)/<img>$1<\/img>/;' < infile.txt > 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
<img></img> tags at the beginning and end of whatever text is in that line of the file. The
> operators indicate input and output to the given filenames.