feat(champion-skin): Improve skin image URL handling

- Refactored the `getSkinImageAttribute` method in ChampionSkin model to accept a boolean parameter for uncentered images.
- Updated references to `getSkinImageAttribute` in ChampionSkinController and blade files to include the new parameter for uncentered images.
This commit is contained in:
Rico van Zelst
2024-04-14 14:29:30 +02:00
parent 0fb2b967fb
commit 29e102e8bb
4 changed files with 10 additions and 6 deletions

View File

@@ -63,7 +63,7 @@ class ChampionSkinController extends Controller
$splashColor = Cache::remember(
'championSkinSplashColorCache'.$championSkin->slug,
60 * 60 * 120,
static fn () => getAverageColorFromImageUrl('https://wsrv.nl/?url='.$championSkin->getSkinImageAttribute())
static fn () => getAverageColorFromImageUrl('https://wsrv.nl/?url=' . $championSkin->getSkinImageAttribute(true))
);
$skin->splash_color = $splashColor;