I want to make it so that any occurance of an image gets wrapped with a link to the image source
How can I write a pattern, in PHP so that I can find these variations, which are scattered throughout text coming from the database:
<img src='/dir/dir2/image1.jpg' alt='blah blah blah'>
<img src="/dir/dir2/image2.jpg" alt="blah blah blah" />
<img src="/dir/dir2/image3.jpg" />
In all cases, I want them to appear within an link.