Skip to content

Commit

Permalink
Fix default images ignoring crop
Browse files Browse the repository at this point in the history
  • Loading branch information
ilestis committed Aug 2, 2023
1 parent b86b05a commit 58cdbae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Models/Concerns/Picture.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ public function avatarV2(MiscModel $child = null): string
if (empty($avatar)) {
// Superboosted and with image?
if ($campaign->superboosted() && $this->image) {
return Img::url($this->image->path);
return Img::crop($this->avatarWidth, $this->avatarHeight)->url($this->image->path);
} elseif ($campaign->boosted() && Arr::has(CampaignCache::defaultImages(), $this->type())) {
// Fallback, boosted default image?
return Img::url(CampaignCache::defaultImages()[$this->type()]['path']);
return Img::crop($this->avatarWidth, $this->avatarHeight)->url(CampaignCache::defaultImages()[$this->type()]['path']);
}

if (auth()->check() && auth()->user()->isGoblin()) {
Expand Down

0 comments on commit 58cdbae

Please sign in to comment.