diff --git a/app/Album.php b/app/Album.php index d19c77b..e375df9 100644 --- a/app/Album.php +++ b/app/Album.php @@ -203,8 +203,6 @@ class Album extends Model return $this->hasMany(Photo::class); } - - public function redirects() { return $this->hasMany(AlbumRedirect::class); @@ -217,13 +215,14 @@ class Album extends Model public function thumbnailUrl($thumbnailName) { + /** @var Photo $photo */ $photo = $this->photos() ->inRandomOrder() ->first(); if (!is_null($photo)) { - return $this->getAlbumSource()->getUrlToPhoto($photo, $thumbnailName); + return $photo->thumbnailUrl($thumbnailName); } // See if any child albums have an image