-<?php
+<?php namespace BookStack;
-namespace Oxbow;
+use Images;
-
-class Image extends Entity
+class Image extends Ownable
{
protected $fillable = ['name'];
- public function getFilePath()
+ /**
+ * 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 storage_path() . $this->url;
+ return Images::getThumbnail($this, $width, $height, $keepRatio);
}
-
}