I assume your question is, "given an IMAGE element (tag) in an HTML document, how do I put it inside a SPAN element". I'll just ignore the fact you want to do it with a regexp, and suggest you use one of the various HTML parsing modules on CPAN. Given an HTML parser, modifying a document should be easy.
Comment on Re: Regex to "wrap" a <span around an image.