modules/media/models/Media.php
public function render($data = [])
    {
        //if file local does not exists
        if (!file_exists($this->baseSource)) {
            return '';
        }

        //check if it's pdf file
        if ($this->mimeType === 'application/pdf') {
            return $this->renderPdf($data);
        } else {
            return $this->renderImage($data);
        }
    }
public function render($data = [])
    {
        //if file local does not exists
        if (!file_exists($this->baseSource)) {
            return '';
        }

        //check if it's pdf file
        if ($this->mimeType === 'application/pdf') {
            return $this->renderPdf($data);
        } else {
            return $this->renderImage($data);
        }
    }
Renders media
@param array $data
@return bool|string