I'm trying to crop picture by a shape picture and tried this
let imageDoc = gm(filePath).resize(100, 100);
imageDoc.mask(`${shapesPath}/hexagon.svg`);
It acts like nothing was done but resizes correctly. Also tried using png file instead of svg, but there is no result at all, maybe there is some way to debug it, or I'm doing something wrong?