Add double-density support to photo thumbnails #28
@ -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 '<img class="inline-image ' . $className . '" src="' . $image_url . '" alt="">';
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user