<?php
$content = "I am an image (http://e...content-available-to-author-only...e.com/image.png) and here's another one: https://www.google.com/image1.gif. I want to be transformed to a proper link: http://www.google.com";
    
$regex_images = '~https?://\S+?(?:png|gif|jpe?g)~';
$regex_links = '~(?<!src=\')https?://\S+\b~';

$content = preg_replace($regex_images, "<img src='\\0'>", $content);
$content = preg_replace($regex_links, "<a href='\\0'>\\0</a>", $content);
echo $content;
   
?>