mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 10:46:14 +01:00
fix: changes to thumb resizing logic
- Resized thumb no longer skews aspect ratio - Thumbs resized down to maximum thumb size by WIDTH only - image.checkDimensions() now returns dimensions
This commit is contained in:
@@ -105,6 +105,8 @@ image.checkDimensions = async function (path) {
|
||||
if (result.width > meta.config.rejectImageWidth || result.height > meta.config.rejectImageHeight) {
|
||||
throw new Error('[[error:invalid-image-dimensions]]');
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
image.convertImageToBase64 = async function (path) {
|
||||
|
||||
Reference in New Issue
Block a user