diff --git a/models/Image.php b/models/Image.php index c8205f8..a43df13 100644 --- a/models/Image.php +++ b/models/Image.php @@ -67,14 +67,18 @@ class Image extends Asset return EXIF::fromFile($this->getPath()); } - public function getPath() + public function getInlineImage($width = null, $height = null, $className = '') { - return ASSETSDIR . '/' . $this->subdir . '/' . $this->filename; - } + if (isset($width) && isset($height)) + $image_url = $this->getThumbnailUrl($width, $height, false); + elseif (isset($width)) + $image_url = $this->getThumbnailUrl($width, null, false); + elseif (isset($height)) + $image_url = $this->getThumbnailUrl(null, $height, false); + else + $image_url = $this->getUrl(); - public function getUrl() - { - return ASSETSURL . '/' . $this->subdir . '/' . $this->filename; + return ''; } /**