Title: Error When Changing Header Image
Last modified: August 22, 2016

---

# Error When Changing Header Image

 *  [majedian21](https://wordpress.org/support/users/majedian21/)
 * (@majedian21)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-when-changing-header-image/)
 * When I attempt to set the header image under the Appearance > Customize sidebar
   menu, I get the following error message:
 *     ```
       Error <filename.jpg>
       There has been an error cropping your image.
       ```
   
 * This is regardless of theme, image, or image proportions either uploaded to or
   already existing in the Media Library. I have turned on DEBUG_MODE and WP_DEBUG_LOG
   but the wp-content/debug.log is not showing anything pertaining to this issue(
   but I am getting other messages, so I’m pretty sure debugging is configured correctly).
 * I have also disabled plugins to rule out that being an issue.
 * chown -R apache: <wproot>/* did not fix the issue either, nor did increasing 
   the PHP memory limit.
 * The only file that contains that error message ‘There has been an error cropping
   your image.’ is wp-includes/media.php at line 2985. My WordPress debugging skills
   are stretching to their current limitations, and I’m looking to see if anyone
   else has seen this before. Thank you.

Viewing 1 replies (of 1 total)

 *  [Koen Smeets](https://wordpress.org/support/users/koen-smeets/)
 * (@koen-smeets)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/error-when-changing-header-image/#post-5471371)
 * Hi, same here…
 * Traced the issue back a bit further:
 * `'cropError' => __( 'There has been an error cropping your image.' ),`
 * Searching for occurrence of cropError in the wp directory found these 2 files:
 * wp-includes/js/media-views.min.js
 * and
 * wp-includes/js/media-views.js
 * So apparently the error message is being called from a javascript ‘routine’? 
   The function calling the crop error is:
 *     ```
       onError: function() {
                               var filename = this.options.attachment.get('filename');
   
                               this.views.add( '.upload-errors', new media.view.UploaderStatusError({
                                       filename: media.view.UploaderStatus.prototype.filename(filename),
                                       message: _wpMediaViewsL10n.cropError
                               }), { at: 0 });
                       }
       ```
   
 * So apparently making an error while uploading the file.
 * Changing the dir permissions to 747 for wp-content/uploads dir fixed the error?
   So apparently the process writing the cropped image is not running as the apache
   user?.. This eventually lead me to find out permission on the ‘upload’ (and underlying
   dirs/files) is not correct. Do check your permissions.
 * Now working fine for me.

Viewing 1 replies (of 1 total)

The topic ‘Error When Changing Header Image’ is closed to new replies.

## Tags

 * [cropping](https://wordpress.org/support/topic-tag/cropping/)
 * [header](https://wordpress.org/support/topic-tag/header/)
 * [image](https://wordpress.org/support/topic-tag/image/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Koen Smeets](https://wordpress.org/support/users/koen-smeets/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/error-when-changing-header-image/#post-5471371)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
