I'm using GF to create a form in which registered users can submit a post with some custom fields and an image. It works ok, but I'm finding some problems with the image upload. Whenever I try to upload an image that is bigger than aprox. 300kb, I get an Out of Memory fatal error:
Fatal error: Out of memory (allocated 34078720) (tried to allocate 7600 bytes) in /homepages/6/d284179443/htdocs/wp-admin/includes/image.php on line 162
I'm guessing the problem comes from having a shared hosting with 1&1, as I don't have this issue in a local server, and might consider upgrading to a dedicated server. However, with images smalles than 300 kb. would be enough for my requirements, so I'm wondering if anyone knows how could I check that the size of the image is not bigger than 300kb before the error triggers.
I've tried plugins that resize the image, but it seems they resize it after the image is uploaded, as I still get the same error.
Any ideas as to how could I go about this?