X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/e5a372ffbd8c4a3a801406fb83038f81433c2e62..refs/pull/422/head:/app/Image.php diff --git a/app/Image.php b/app/Image.php index 07db68785..ad23a077a 100644 --- a/app/Image.php +++ b/app/Image.php @@ -1,26 +1,21 @@ -url; - } - - public function createdBy() - { - return $this->belongsTo('Oxbow\User', 'created_by'); - } - - public function updatedBy() + /** + * Get a thumbnail for this image. + * @param int $width + * @param int $height + * @param bool|false $keepRatio + * @return string + */ + public function getThumb($width, $height, $keepRatio = false) { - return $this->belongsTo('Oxbow\User', 'updated_by'); + return Images::getThumbnail($this, $width, $height, $keepRatio); } }