diff --git a/app/Livewire/Pages/ElectionTurnouts.php b/app/Livewire/Pages/ElectionTurnouts.php index da730f8..31b4311 100644 --- a/app/Livewire/Pages/ElectionTurnouts.php +++ b/app/Livewire/Pages/ElectionTurnouts.php @@ -34,7 +34,7 @@ public function candidates(): Collection ->get() ->map(fn (Candidate $candidate) => [ 'name' => $candidate->name, - 'image' => $candidate->getFirstMediaUrl(), + 'image' => $candidate->getFirstMediaUrl('default', 'thumb'), 'party' => $candidate->party?->name, ]); } diff --git a/app/Repositories/VotesRepository.php b/app/Repositories/VotesRepository.php index f14404f..f8fd3cc 100644 --- a/app/Repositories/VotesRepository.php +++ b/app/Repositories/VotesRepository.php @@ -79,7 +79,7 @@ public static function getForLevel( $data = [ 'name' => $votable->acronym ?? $votable->name, - 'image' => $votable->getFirstMediaUrl(), + 'image' => $votable->getFirstMegetFirstMediaUrl('default', 'thumb'), 'votes' => (int) ensureNumeric($vote->votes), 'percent' => percent($vote->votes, $total), 'color' => hex2rgb($votable->color),