protected function getPreviewImageSource()
    {
        $imageName = $this->getViewFileName('jpg');
    
        $reflector = new \ReflectionClass($this);
        $dirPath = dirname($reflector->getFileName(), 2);
        $imagePath = $dirPath . '/images/blocks/' . $imageName;
        // file get content resolved Yii aliases.
        $data = FileHelper::getFileContent($imagePath);
        if ($data) {
            return 'data:image/jpg;base64,' . base64_encode($data);
        }
        
        return false;
    }
protected function getPreviewImageSource()
    {
        $imageName = $this->getViewFileName('jpg');
    
        $reflector = new \ReflectionClass($this);
        $dirPath = dirname($reflector->getFileName(), 2);
        $imagePath = $dirPath . '/images/blocks/' . $imageName;
        // file get content resolved Yii aliases.
        $data = FileHelper::getFileContent($imagePath);
        if ($data) {
            return 'data:image/jpg;base64,' . base64_encode($data);
        }
        
        return false;
    }
protected function getPreviewImageSource ( ) { $ imageName = $ this -> getViewFileName ( 'jpg' ) ; $ reflector = new \ ReflectionClass ( $ this ) ; $ dirPath = dirname ( $ reflector -> getFileName ( ) , 2 ) ; $ imagePath = $ dirPath . '/images/blocks/' . $ imageName ; // file get content resolved Yii aliases. $ data = FileHelper :: getFileContent ( $ imagePath ) ; if ( $ data ) { return 'data:image/jpg;base64,' . base64_encode ( $ data ) ; } return false ; }
Path to the preview image.
@since 1.0.8
Path to the preview image .