the error means there is output between php tags.
see the following page for details:
showthread.php?t=19285
in the file upload behavior, you have left the default file setting for the main image blank, only the resized image has a default file setting. you need to bind the main images default file to the hidden form element.