public function EmbedBase64Image($path)
    {
        $mime = $this->getMimeType($path);
        if ($mime) {
            $content = file_get_contents($path);

            if ($content) {
                return "data:{$mime};base64," . base64_encode($content);
            }
        }

        return null;
    }
public function EmbedBase64Image($path)
    {
        $mime = $this->getMimeType($path);
        if ($mime) {
            $content = file_get_contents($path);

            if ($content) {
                return "data:{$mime};base64," . base64_encode($content);
            }
        }

        return null;
    }
public function EmbedBase64Image ( $ path ) { $ mime = $ this -> getMimeType ( $ path ) ; if ( $ mime ) { $ content = file_get_contents ( $ path ) ; if ( $ content ) { return "data:{$mime};base64," . base64_encode ( $ content ) ; } } return null ; }
Make a data URL from an image file
@param string $path
@return string|null
Make a data URL from an image file