Skip to content

Commit

Permalink
Merge pull request #105 from bookernath/STRF-3251
Browse files Browse the repository at this point in the history
Add support for inherent width resizing
  • Loading branch information
bc-zoharmuzafi authored Jul 5, 2019
2 parents 47f29e5 + 00442ae commit 308fcb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tools/image.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export default class {
getSrc(path, dimensions) {
const sizeRegex = /^(\d+?)x(\d+?)$/g;
// Regex to test size string is of the form 123x123 or 100w
const sizeRegex = /(^\d+w$)|(^(\d+?)x(\d+?)$)/g;
let size;

if (typeof(dimensions) === 'object') {
Expand Down

0 comments on commit 308fcb9

Please sign in to comment.