Fix thumbnail size

This commit is contained in:
Pierre HUBERT 2023-08-10 12:14:44 +02:00
parent d1e55d574e
commit 1cf79e621f
3 changed files with 7 additions and 3 deletions

View File

@ -114,6 +114,10 @@ export class Member implements MemberDataApi {
get photoURL(): string {
return `${APIClient.backendURL()}/photo/${this.signed_photo_id}`;
}
get thumbnailURL(): string {
return `${APIClient.backendURL()}/photo/${this.signed_photo_id}/thumbnail`;
}
}
export class MembersList {

View File

@ -9,7 +9,7 @@ export function MemberPhoto(p: {
<Avatar
sx={{ width: `${p.width}px`, height: "auto", display: "inline-block" }}
variant="rounded"
src={p.member.photoURL}
src={p.member.thumbnailURL}
/>
);
}

View File

@ -130,7 +130,7 @@ pub const ALLOWED_PHOTOS_MIMETYPES: [&str; 6] = [
pub const PHOTOS_MAX_SIZE: usize = 10 * 1000 * 1000;
/// Thumbnail width
pub const THUMB_WIDTH: u32 = 150;
pub const THUMB_WIDTH: u32 = 350;
/// Thumbnail height
pub const THUMB_HEIGHT: u32 = 150;
pub const THUMB_HEIGHT: u32 = 350;