Floor media dimensions to prevent blurhash errors (#8157)
This commit is contained in:
parent
bc01efa124
commit
3160442b8b
2 changed files with 6 additions and 2 deletions
|
@ -34,5 +34,9 @@ describe("ImageSize", () => {
|
|||
const size = suggestedSize(ImageSize.Normal, { w: null, h: null });
|
||||
expect(size).toStrictEqual({ w: 324, h: 324 });
|
||||
});
|
||||
it("returns integer values", () => {
|
||||
const size = suggestedSize(ImageSize.Normal, { w: 642, h: 350 }); // does not divide evenly
|
||||
expect(size).toStrictEqual({ w: 324, h: 176 });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue