diff options
| author | ilotterytea <iltsu@alright.party> | 2025-05-12 14:09:40 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-05-12 14:09:40 +0500 |
| commit | 6e5481c5d6cc3cc562cc3674b95dacbcb88372d7 (patch) | |
| tree | 436a7115c077cbfe7111635fb06314bda951ba6b /public/users.php | |
| parent | 952058eed3a6e8d3eb04dc8795e647ef4f655306 (diff) | |
feat: create image bundles for avatars and banners
Diffstat (limited to 'public/users.php')
| -rw-r--r-- | public/users.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/public/users.php b/public/users.php index 3320451..fced3eb 100644 --- a/public/users.php +++ b/public/users.php @@ -93,8 +93,8 @@ if ($id == "" && $alias_id == "") { echo '<tr><td>'; echo '<img src="/static/'; - if (is_file("static/userdata/avatars/" . $row["id"])) { - echo 'userdata/avatars/' . $row["id"]; + if (is_dir("static/userdata/avatars/" . $row["id"])) { + echo 'userdata/avatars/' . $row["id"] . '/1x.webp'; } else { echo 'img/defaults/profile_picture.png'; } @@ -315,7 +315,8 @@ if ($is_json) { </head> <body> - <div class="background" style="background-image: url('/static/userdata/banners/<?php echo $user->id() ?>');"> + <div class="background" + style="background-image: url('/static/userdata/banners/<?php echo $user->id() ?>/3x.webp');"> <div class="background-layer"></div> </div> @@ -332,8 +333,8 @@ if ($is_json) { <div class="box content justify-center items-center"> <?php echo '<img src="/static/'; - if (is_file("static/userdata/avatars/" . $user->id())) { - echo 'userdata/avatars/' . $user->id(); + if (is_dir("static/userdata/avatars/" . $user->id())) { + echo 'userdata/avatars/' . $user->id() . '/3x.webp'; } else { echo 'img/defaults/profile_picture.png'; } |
