public function registerImageDirectives()
    {
        Blade::directive('eyewitness_img', function($file) {
            $file = trim(trim($file, "("), ")");
            $string = $this->loadFile(__DIR__.'/../../resources/assets/images/'.trim($file, "'"));
            return '<img src="data:image/x-icon;base64,'.base64_encode($string).'"/>';
        });

        Blade::directive('eyewitness_img_raw_base64', function($file) {
            $file = trim(trim($file, "("), ")");
            $string = $this->loadFile(__DIR__.'/../../resources/assets/images/'.trim($file, "'"));
            return base64_encode($string);
        });
    }
public function registerImageDirectives()
    {
        Blade::directive('eyewitness_img', function($file) {
            $file = trim(trim($file, "("), ")");
            $string = $this->loadFile(__DIR__.'/../../resources/assets/images/'.trim($file, "'"));
            return '<img src="data:image/x-icon;base64,'.base64_encode($string).'"/>';
        });

        Blade::directive('eyewitness_img_raw_base64', function($file) {
            $file = trim(trim($file, "("), ")");
            $string = $this->loadFile(__DIR__.'/../../resources/assets/images/'.trim($file, "'"));
            return base64_encode($string);
        });
    }
public function registerImageDirectives ( ) { Blade :: directive ( 'eyewitness_img' , function ( $ file ) { $ file = trim ( trim ( $ file , "(" ) , ")" ) ; $ string = $ this -> loadFile ( __DIR__ . '/../../resources/assets/images/' . trim ( $ file , "'" ) ) ; return '<img src="data:image/x-icon;base64,' . base64_encode ( $ string ) . '"/>' ; } ) ; Blade :: directive ( 'eyewitness_img_raw_base64' , function ( $ file ) { $ file = trim ( trim ( $ file , "(" ) , ")" ) ; $ string = $ this -> loadFile ( __DIR__ . '/../../resources/assets/images/' . trim ( $ file , "'" ) ) ; return base64_encode ( $ string ) ; } ) ; }
Register image directives.

To be used @eyewitness_img('image_name.ext')

@return void
Register image directives .