diff --git a/src/matrix/net/MediaRepository.js b/src/matrix/net/MediaRepository.js index 2e7ec438..7bd20cce 100644 --- a/src/matrix/net/MediaRepository.js +++ b/src/matrix/net/MediaRepository.js @@ -28,7 +28,7 @@ export class MediaRepository { if (parts) { const [serverName, mediaId] = parts; const httpUrl = `${this._homeServer}/_matrix/media/r0/thumbnail/${encodeURIComponent(serverName)}/${encodeURIComponent(mediaId)}`; - return httpUrl + "?" + encodeQueryParams({width, height, method}); + return httpUrl + "?" + encodeQueryParams({width: Math.round(width), height: Math.round(height), method}); } return null; }