Fix thumb size

old-stable24
Varun Patil 2022-10-15 21:26:01 -07:00
parent ae5fb92682
commit 29fc57498a
1 changed files with 5 additions and 1 deletions

View File

@ -82,7 +82,11 @@ export default class Photo extends Mixins(GlobalMixin) {
/** Get url of the photo */ /** Get url of the photo */
get url() { get url() {
return getPreviewUrl(this.data.fileid, this.data.etag, false, 512) let size = 256;
if (this.data.w && this.data.h) {
size = Math.floor(size * Math.max(this.data.w, this.data.h) / Math.min(this.data.w, this.data.h));
}
return getPreviewUrl(this.data.fileid, this.data.etag, false, size)
} }
/** Image loaded successfully */ /** Image loaded successfully */