you can try increasing the php memory limit by adding this code at line 1:
<?php ini_set('memory_limit', '32M'); ?>
to restrict the size of the image that can be uploaded, you would need to use the server validations from CSS Form Builder.
You can use numeric server validation to restrict the width or height by a maximum number of pixels, or restrict the size by a maximum number of bites.