public static function getDataURI($image, $mime = '') {
        return 'data: ' . (function_exists('mime_content_type') ? mime_content_type($image) : $mime) . ';base64,' . base64_encode(file_get_contents($image));
    }
public static function getDataURI($image, $mime = '') {
        return 'data: ' . (function_exists('mime_content_type') ? mime_content_type($image) : $mime) . ';base64,' . base64_encode(file_get_contents($image));
    }
public static function getDataURI ( $ image , $ mime = '' ) { return 'data: ' . ( function_exists ( 'mime_content_type' ) ? mime_content_type ( $ image ) : $ mime ) . ';base64,' . base64_encode ( file_get_contents ( $ image ) ) ; }
Generate base64 representation of image
@param string $image
@param string $mime
@return string
Generate base64 representation of image