mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
This commit is contained in:
parent
22da2647c7
commit
28bf8649b3
1 changed files with 9 additions and 1 deletions
|
@ -178,13 +178,21 @@ class Profile extends Model
|
||||||
return url('/storage/avatars/default.jpg');
|
return url('/storage/avatars/default.jpg');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($path === 'public/avatars/default.jpg') {
|
||||||
|
return url('/storage/avatars/default.jpg');
|
||||||
|
}
|
||||||
|
|
||||||
if(substr($path, 0, 6) !== 'public') {
|
if(substr($path, 0, 6) !== 'public') {
|
||||||
return url('/storage/avatars/default.jpg');
|
return url('/storage/avatars/default.jpg');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(config('filesystems.default') !== 'local') {
|
||||||
|
return Storage::url($path);
|
||||||
|
}
|
||||||
|
|
||||||
$path = "{$path}?v={$avatar->change_count}";
|
$path = "{$path}?v={$avatar->change_count}";
|
||||||
|
|
||||||
return config('app.url') . Storage::url($path);
|
return url(Storage::url($path));
|
||||||
});
|
});
|
||||||
|
|
||||||
return $url;
|
return $url;
|
||||||
|
|
Loading…
Reference in a new issue