src/image/Item.php
public function getSource($scheme = false)
    {
        if (!$this->getFileExists()) {
            if (Yii::$app->storage->autoFixMissingImageSources === false) {
                return false;
            }
            
            // The image source does not exist, probably it has been deleted due to filter changes.
            // storage component is going go try to re-create this image now.
            $apply = Yii::$app->storage->createImage($this->getFileId(), $this->getFilterId());
        }
        
        $fileName = $this->getFilterId() . '_' . $this->getFile()->getSystemFileName();
        
        return $scheme ? Yii::$app->storage->fileAbsoluteHttpPath($fileName) : Yii::$app->storage->fileHttpPath($fileName);
    }
public function getSource($scheme = false)
    {
        if (!$this->getFileExists()) {
            if (Yii::$app->storage->autoFixMissingImageSources === false) {
                return false;
            }
            
            // The image source does not exist, probably it has been deleted due to filter changes.
            // storage component is going go try to re-create this image now.
            $apply = Yii::$app->storage->createImage($this->getFileId(), $this->getFilterId());
        }
        
        $fileName = $this->getFilterId() . '_' . $this->getFile()->getSystemFileName();
        
        return $scheme ? Yii::$app->storage->fileAbsoluteHttpPath($fileName) : Yii::$app->storage->fileHttpPath($fileName);
    }
public function getSource ( $ scheme = false ) { if ( ! $ this -> getFileExists ( ) ) { if ( Yii :: $ app -> storage -> autoFixMissingImageSources === false ) { return false ; } // The image source does not exist, probably it has been deleted due to filter changes. // storage component is going go try to re-create this image now. $ apply = Yii :: $ app -> storage -> createImage ( $ this -> getFileId ( ) , $ this -> getFilterId ( ) ) ; } $ fileName = $ this -> getFilterId ( ) . '_' . $ this -> getFile ( ) -> getSystemFileName ( ) ; return $ scheme ? Yii :: $ app -> storage -> fileAbsoluteHttpPath ( $ fileName ) : Yii :: $ app -> storage -> fileHttpPath ( $ fileName ) ; }
Get the source path to the image location on the webserver.

@param string $scheme Whether the source path should be absolute or not.
@return string|boolean
Get the source path to the image location on the webserver .