Fix image measurement on Node.js