'Manipulate an image file according to the method, returning a
new path. For PIL or IMAGEMAGIC methods, resizes the image to a
temporary file. For WEBPROXY, returns `path_in` unmodified.'

def resize(self, maxwidth, path_in, path_out=None):

    if self.local:
        func = BACKEND_FUNCS[self.method[0]]
        return func(maxwidth, path_in, path_out)
    else:
        return path_in
