Assuming scope is a string, you should be able to refer to `config.variants[scope].resize` here and avoid eval.

Also if for some reason `scope` wasn't defined in `variants` (potentially due to misconfiguration) this would throw a hard error and end the node process. Should be written more defensively - misconfiguraton should throw a warning on init, not like this in the middle of a task.