Title: Getting error when uploading media
Last modified: August 21, 2016

---

# Getting error when uploading media

 *  Resolved [moisture9063](https://wordpress.org/support/users/ngrhd/)
 * (@ngrhd)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/getting-error-when-uploading-media/)
 * Hello
 * I’m getting the following errors when uploading medias:
 * Warning: finfo_file(): Failed identify data 12:cannot allocate 2097160 bytes (
   Cannot allocate memory)application/x-executable; charset=binary in /home/shreejee/
   public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php 
   on line 331
 * Warning: mime_content_type(): Failed identify data 12:cannot allocate 2097160
   bytes (Cannot allocate memory)application/x-executable in /home/shreejee/public_html/
   wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 350
 * Warning: finfo_file(): Failed identify data 12:cannot allocate 2097160 bytes (
   Cannot allocate memory)application/x-executable; charset=binary in /home/shreejee/
   public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php 
   on line 331
 * Warning: mime_content_type(): Failed identify data 12:cannot allocate 2097160
   bytes (Cannot allocate memory)application/x-executable in /home/shreejee/public_html/
   wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 350
 * Warning: finfo_file(): Failed identify data 12:cannot allocate 2097160 bytes (
   Cannot allocate memory)application/x-executable; charset=binary in /home/shreejee/
   public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php 
   on line 331
 * Warning: mime_content_type(): Failed identify data 12:cannot allocate 2097160
   bytes (Cannot allocate memory)application/x-executable in /home/shreejee/public_html/
   wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 350
 * Warning: finfo_file(): Failed identify data 12:cannot allocate 2097160 bytes (
   Cannot allocate memory)application/x-executable; charset=binary in /home/shreejee/
   public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php 
   on line 331
 * Warning: mime_content_type(): Failed identify data 12:cannot allocate 2097160
   bytes (Cannot allocate memory)application/x-executable in /home/shreejee/public_html/
   wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 350
 * Warning: finfo_file(): Failed identify data 12:cannot allocate 2097160 bytes (
   Cannot allocate memory)application/x-executable; charset=binary in /home/shreejee/
   public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php 
   on line 331
 * Warning: mime_content_type(): Failed identify data 12:cannot allocate 2097160
   bytes (Cannot allocate memory)application/x-executable in /home/shreejee/public_html/
   wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 350
 * Warning: finfo_file(): Failed identify data 12:cannot allocate 2097160 bytes (
   Cannot allocate memory)application/x-executable; charset=binary in /home/shreejee/
   public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php 
   on line 331
 * Warning: mime_content_type(): Failed identify data 12:cannot allocate 2097160
   bytes (Cannot allocate memory)application/x-executable in /home/shreejee/public_html/
   wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 350
 * Warning: finfo_file(): Failed identify data 12:cannot allocate 2097160 bytes (
   Cannot allocate memory)image/jpeg; charset=binary in /home/shreejee/public_html/
   wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 331
 * Warning: finfo_file(): Failed identify data 12:cannot allocate 2097160 bytes (
   Cannot allocate memory)application/x-executable; charset=binary in /home/shreejee/
   public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php 
   on line 331
 * Warning: mime_content_type(): Failed identify data 12:cannot allocate 2097160
   bytes (Cannot allocate memory)application/x-executable in /home/shreejee/public_html/
   wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 350
 * Warning: finfo_file(): Failed identify data 12:cannot allocate 2097160 bytes (
   Cannot allocate memory)application/x-executable; charset=binary in /home/shreejee/
   public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php 
   on line 331
 * Warning: mime_content_type(): Failed identify data 12:cannot allocate 2097160
   bytes (Cannot allocate memory)application/x-executable in /home/shreejee/public_html/
   wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 350
 * Is this related to my hosting company or what?
 * Please advice
 * Thanks
 * [https://wordpress.org/plugins/ewww-image-optimizer/](https://wordpress.org/plugins/ewww-image-optimizer/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/getting-error-when-uploading-media/#post-5033772)
 * Yes, you should contact your webhost support for help. It means you are running
   out of memory. You may need to look at other plugins you are running, to see 
   if you can trim things down at all, but in any case, your webhost will be best
   able to assist you.
 *  Thread Starter [moisture9063](https://wordpress.org/support/users/ngrhd/)
 * (@ngrhd)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/getting-error-when-uploading-media/#post-5033787)
 * Hello
 * Thank you for your reply.
 * I contacted my webhost and they already have allocated 256MB, is this very less
   for the plugin to work?
    I never used to face this before.
 * Here’s my phpinfo: [http://shreejee.co/phpinfo.php](http://shreejee.co/phpinfo.php)
 * Please advice.
 * Thanks once again
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/getting-error-when-uploading-media/#post-5033798)
 * The plugin itself doesn’t require too much (although I accidentally slip a memory-
   hungry query in every once in a while, but this is not one of those times), but
   if you were already close to the limit prior to installing the plugin, then it’s
   going to push you over it pretty easily. Some users have reported needing as 
   much as 512MB or more for their sites. That seems crazy to me, as I can run it
   on my dev site with 128MB (or less).
 *  Thread Starter [moisture9063](https://wordpress.org/support/users/ngrhd/)
 * (@ngrhd)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/getting-error-when-uploading-media/#post-5033816)
 * Just a heads up.
 * Images are getting crunched when checking the library.
 * But is it healthy to just ignore this?
 * Also everything seems to be OK:
 * jpegtran: OK version: Independent JPEG Group’s JPEGTRAN, version 9 13-Jan-2013
   
   optipng: OK version: OptiPNG version 0.7.4 gifsicle: OK version: LCDF Gifsicle
   1.78 Graphics libraries – only need one, used for conversion, not optimization:
   GD: OK   Imagemagick ‘convert’: OK safe mode: Off  exec(): OK   Only need one
   of these: finfo: OK  getimagesize(): OK  mime_content_type(): OK
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/getting-error-when-uploading-media/#post-5033824)
 * It’s probably falling back to the getimagesize() function, but I’m not sure I
   would ignore the issue. I would investigate what other plugins are consuming 
   memory when you upload images to see if you can eliminate the root cause of the
   warnings (even though warnings are not fatal, they can be troublesome).

Viewing 5 replies - 1 through 5 (of 5 total)

 The topic ‘Getting error when uploading media’ is closed to new replies.

 * ![](https://ps.w.org/ewww-image-optimizer/assets/icon-256x256.png?rev=1582276)
 * [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/getting-error-when-uploading-media/#post-5033824)
 * Status: resolved