Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress WordPress Basics Managing Media in WordPress Adding Images to a Post or Page

Can't upload photo from computer

I keep getting the same error message whilst trying to upload a file

File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.

Well uploads are enabled in php.ini and post-max-size was the same as upload-max-filesize. I tried changing it to slightly larger but to no avail. There doesn't seem to be any obvious solution on the web. Using DesktopServer. Do the upload files have to be in a certain folder perhaps? URL photos are working okay.

3 Answers

Hi Duncan,

Is this on a mac or PC? As well, did you try a different file altogether? and a different file type? I am assuming you were trying this in the media gallery?

Thanks, Mark

By chance did you try different browsers? As well, did you disable any/all plugins to make sure it wasn't one of those too?

I tried Safari and Firefox. I only have one plugin related to email but I will try with this switched off tomorrow. Thanks again.

Hi, I deactivated the plugin, still no joy. Also, since upgrading to Wordpress 4.6.1 the error message is different:

This file type is not allowed. Please try another.

Hmm... Did you by chance try setting up a new site with Desktop Server and seeing if it had the same issue?

I tried a new site this evening, still doesn't work. I did however notice on Wordpress dashboard a banner that I need to upgrade my Safari but it's as new as can be for this OS and computer. My OS is very old (OS X 10.6.3) but again it's as new as I can get with my computer's specs. I'm beginning to wonder if this is the problem...

hmm what about chrome? and it is very possible it is the browser and a conflict. 10.6.3 was 2010

Thanks Mark, Chrome worked! I didn't even have it installed before but can already why it's the most popular browser.

Cheers!

Nice! I am glad that worked out for you. I personally, prefer chrome's developer tools over others but all get the job done just boils down to preference.

Thanks for your reply Mark. It is a Mac and I have tried Jpg, Jpeg and PNG files and different files within those types. Nothing has worked except URLs. Yes it was the media gallery.

Hi Sergio,

Please follow up on information you are attempting to post.

That link does not have anything directly to do with wordpress.

SetEnv MAGICK_THREAD_LIMIT 1 has to do with shared hosting and limiting the abuse of CPU usage by telling Imagick to only run on a single thread and avoids a general http error.