Can't upload images

Hi, first of all thanks for the great theme!

But since today I’m having troubles with uploading images. When I want to upload an image the photo don’t show in mediabrowser and there appears an error called: “An error occurred in the upload. Please try again later”. This isn’t the first time I’m dealing with this error and in most cases there’s a problem with the plugins, but this time it isn’t.

I think I found the problem. Everything was fine until I added a few lines in the file ‘header-extensions.php’. I needed to to put some extra logo’s in the header and this was the way to do it. I also found out a member from the Colorlib-team told someone the same thing when he asked how he could put an extra logo in the header, so it should’t lead to problem I guess.

Still I almost know for sure this is the problem, because I installed the theme again from scratch and everything worked as supposed. But when I edited the ‘header-extensions.php’-file the error appeared again. The only way to add media is by switching between themes, but this isn’t ideal at all.

I hope you have some kind of a solution for this problem. The website I’m talking about is:
www.winterartikelen.nl/home

Thank you in advance.

Kind regards,

Jelle Smid

It really depends on what you edited on that header-extensions.php file. It does work by default, so you should check your own code for mistakes. Really can’t image what could be added there to break basic WordPress functionality.

This error usually occurs when some plugin processes all images such as copyright text on images, image resizer, image quality tweakers or some other image automated processing plugin. Make sure you disable all plugins and check if it does anything. Even ones you think that has nothing to do with it.

Like I said, this error is related to image processing but there is nothing inside header-extensions.php file that does anything with images (Custom Header Image and Logo is handled via WordPress core and it just shows image output), so there is nothing that can go wrong with it.

Additionally it could be server configuration that permits proper image upload but since you mentioned that it happens only with this theme then it is just a speculation.

Hi Aigars, thank you very much for your reaction. I agree with you, it’s a weird thing. I already tried disabling/removing the plugins, but it didn’t work. After I reinstalled a fresh copy the Travelify-theme I changed the main stylesheet and everything worked fine, but when I edited the header-extentions.php file the error appeared. I’ll try figuring this thing out this week. Maybe there indeed a mistake in my own code. I hope so. I’ll get back to you.

Thanks again.

Sorry that I couldn’t help you this time.

If you get this problem sorted, please let me know what was the issues because I am really puzzled about this one.

Btw, check what is printed on your server log file one the error occurs, there might be more information on it.