feat: Add support for uncentered champion images

- Updated the Champion model to include an optional parameter for retrieving uncentered champion images. Adjusted image URLs in relevant views accordingly.
This commit is contained in:
Rico van Zelst
2024-04-14 14:21:32 +02:00
parent a6ac3f8496
commit 0fb2b967fb
4 changed files with 22 additions and 18 deletions

View File

@@ -37,7 +37,7 @@ class ChampionController extends Controller
$splashColor = Cache::remember(
'championSplashColorCache'.$champion->slug,
$sixMonthsInSeconds,
static fn () => getAverageColorFromImageUrl('https://wsrv.nl/?url='.$champion->getChampionImageAttribute())
static fn () => getAverageColorFromImageUrl('https://wsrv.nl/?url=' . $champion->getChampionImageAttribute(true))
);
$champion->splash_color = $splashColor;