Added resizeImage function, implemented it in the admin controller