maybe one option would be to use pilkit: http://pilkit.readthedocs.org/en/latest/
this adds a dependency, but pilkit already has a lot of options to resize images. Your `RESIZE` setting could take a lit of pilkit processors with theirs options, this would make a highly configurable plugin.