From 2f1bf563723b93980f8d36361961d3c8adf8fd0d Mon Sep 17 00:00:00 2001 From: Arpee Ong Date: Sun, 28 Jul 2019 00:12:08 +0800 Subject: [PATCH] Fix for proper resizing if the filename or path contains letter x with digits surrounding it eg: 8x8 --- source/image-handler/thumbor-mapping.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/image-handler/thumbor-mapping.js b/source/image-handler/thumbor-mapping.js index d2fbf72d9..e0d3c7364 100644 --- a/source/image-handler/thumbor-mapping.js +++ b/source/image-handler/thumbor-mapping.js @@ -31,7 +31,7 @@ class ThumborMapping { const filetype = (this.path.split('.'))[(this.path.split('.')).length - 1]; //Process the Dimenions - const dimPath = this.path.match(/\d+x\d+/g); + const dimPath = this.path.match(/[^\/]\d+x\d+/g); if (dimPath) { const dims = dimPath[0].split('x'); // Set only if the dimensions provided are valid