PHP Template: Image file upload handler
DO NOT use GOTO. They have been criticised since 1960s.



Your indentation is broken for the first snippet. It is also inconsistent with your second snippet. Keep it consistent throughout a project. Try looking at some linters or follow a style guide.
Do not suppress your errors by using @. Let the function throw any and all errors it encounters. You should instead make use of try-catch blocks.
While you could replace the error lookups by error code to a switch-case block, I'd suggest that you use an associated array (or a hashtable) to keep a mapping from ERROR_CODE =&gt; "ERROR MESSAGE". This will go in a separate errors.php maybe, and referenced as needed.
Define the target image resolution as a constant, instead of placing magic numbers.
You could also have a client side javascript snippet for checking file size, so that users do not waste their bandwidth and time waiting for upload process.