use minimagic to resize uploaded files