function "uploadimage" moved to component.php