Question: How to check if a image src have a blob URL or simple URL in php

**Edit**

You can simply say that how to check if a object in img src is blob or not?

Answer: 
You can do it before using it in the image source.

Firstly take out the link from the line SRC using regex or using DomDocument like following:  

`$html = '';
 $doc = new DOMDocument();
 $doc->loadHTML($html);
 $xpath = new DOMXPath($doc);
 $src = $xpath->evaluate("string(//img/@src)");`  

Then use parse\_html to check if there is host and path in the url. If the parse\_html results in false then the link could be stored and check for proper files using file\_put\_content .
You can use file\_exists to check if it is a file.

```
if( file_exists( $url ) ) ){
  // it is a file
} 
else{
  // it is a blob
}

```