fork ResizeOnUpload Plugin by Vasiliy Naumkin