How can I tranform this regex to search only in src=* and not all the links that start with http and end with jpg, png, gif? Additionally I want to get the https images. Thank you!
preg_match('!http://.+\.(?:jpe?g|png|gif)!Ui' , $content , $matches);