• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Best Hosting And Design

Affordable price and peace of mind guaranteed!

  • Services
    • Web Hosting
    • WordPress Installation
    • Website Design
    • WordPress Site Maintenance
    • Website Migration
  • Contact Us
    • Our Goal
  • Portfolio
  • Praise
  • Free Blogging E-Course

Get rid of image upload problems in WordPress with this simple guide

posted on September 10, 2019

Tweet
Share18
Share
Pin9
27 Shares
Get rid of image upload problems in WordPress with this simple guide 1

In case you have been using WordPress for long enough, you must have encountered a common issue while uploading image files.

Technically, this error might occur due to different reasons, but WordPress just presents you with a HTTP error.

HTTP error

So, basically you have to understand the reason why your image file is not getting uploaded and then only will you be able to fix the issue.

Contents

  • 1 Why does this error occur?
  • 2 Problem and its solution
    • 2.1 Check for Temporary Errors
    • 2.2 WordPress Memory
    • 2.3 Image Library
    • 2.4 Folder/File permission
    • 2.5 Plugin related issues
    • 2.6 Image Size / type
    • 2.7 MOD security
    • 2.8 Php Version
    • 2.9 Rename your image file

Why does this error occur?

Although WordPress is not really able to parse this error and tell you the exact reason why this error occurs, there are some certain reasons which might cause this problem.

In most cases, this problem turns out to be pretty much temporary. Due to lack of server resource or unusual traffic, you might face some errors while working with the WordPress Image Uploader.

Get rid of image upload problems in WordPress with this simple guide 2

Another problem might be the amount of memory allocated for the server, the size of the file that you wish to upload, the file extension of the file, and you can even face issues with the file access on your server.

Problem and its solution

Check for Temporary Errors

Before you go ahead and try out different solutions, the first thing you need to do is check whether the error shown on your WordPress is not temporary.

Although this cannot help you in specifying the reason of the http error but you can get going with the problem solving methods.

In case you are having a problem with your image file extension or file size, modifying the file extension or getting a file with smaller size will solve the problem.

In case the problem persists, you need to go for other methods.

WordPress Memory

WordPress Memory

Another common reason why you might be facing an http error is the insufficient memory for WordPress.

As you can understand, without having proper resources, it might become a
headache to get going with the file upload without any error.

You can define the WordPress memory size in the wp-config file on your server. This will allow your server to allocate enough resources for WordPress to run smoothly.

Image Library

Image Library

WordPress deals with 2 different image uploading libraries known as Imagick and GD library.

In most cases WordPress, by default, choose to go with Imagick but as it turns out this image library is known for its http errors while uploading a file and this is the reason why you need to change it to GD library.

To do so, you will need to add a snippet of code to your function.php file and it should do the trick.

function bhad_image_editor_default_to_gd( $editors ) {
$gd_editor = 'WP_Image_Editor_GD';
$editors = array_diff( $editors, array( $gd_editor ) );
array_unshift( $editors, $gd_editor );
return $editors;
}
add_filter( 'wp_image_editors', 'bhad_image_editor_default_to_gd' );

In case you are facing similar problem even after changing your image library, you might have to go for other methods of solving image upload issues.

Folder/File permission

Folder/File permission

Another common reason that may cause this problem is the file or folder permission on your server.

To check whether there is a problem with the file permission on your server, you need to logon to your server or use a FTP account to view your files and folders on the server.

Under the public_html folder you can find wp-content. Under that folder find Uploads folder and check the file permission.

Right click on it; go to ‘File permission’, then tick mark ‘Recurse into subdirectories’ and select ‘apply to all files and directories’. Now click ‘OK’ and save the file permission.

apply to all files and directorie

Now check with the WordPress image library, it should be fine with all the uploaded images.

Plugin related issues

Plugin related issues

At times, installing plugins might create problems in uploading files on WordPress.

Using old version of plugins or errors in the plugin code might trigger the error.

The only way to know the problem with your plugins will be to start disabling each and every plugin one by one and check whether the uploading error is gone or not.

In case you are using a plugin to assist your uploading work, you need to check that plugin as well.

Until you find out a particular plugin that is creating the problem, you have to keep doing this.

Image Size / type

Image Size / type

Sometimes it might so happen that a particular file is really large.

In this kind of situation, if you get an html error while uploading, it is really wise to either choose a photo with lower resolution or file size or you can try and reduce the file size so that it gets uploaded on your WordPress.

Make sure to check with the other file sizes that you already uploaded before in order to have an idea about what kind of file size might allow you to upload that specific file.

In some cases, changing the file extension might help as well.

MOD security

MOD security

You must have seen a security file residing in your WordPress directory.

Well, in case you haven’t seen it before, you need to know about this file now.

In case the file is enabled on your server, you will need to add some specific codes to ensure that your WordPress does not produce any error while uploading an image file.

For this you need to add .htaccess file to your wp-admin folder and add the necessary codes to grant access of other folders to your WordPress image uploader.

Once done, you should not face any issues with image uploading.

Php Version

The problem with php version might arise if you update your plugins and WordPress versions pretty much frequently.

In this kind of situation, if you do not update your server php version, then you might have to face this kind of issue with image file upload.

Rename your image file

Rename your image file

In case none of the above techniques work, you can try this method as a last resort. Just try to re-upload your file after you rename the file.

This trick might work in case the file name comprises of multiple symbols.

So, that is all that you need to know to get rid of html errors while uploading images to WordPress.

In case you face such problems one of these above methods will surely help you out and you will be able to keep uploading files on your WordPress without any problem at all.

Tweet
Share18
Share
Pin9
27 Shares

Filed Under: Tutorials, WordPress Tagged With: File permission in WordPress, How to fix image upload issue in WordPress, image upload issue, image upload issues in WordPress, MOD security, WordPress tutorials

About Jane Sheeba

I'm Jane, the owner of Best Hosting And Design, where I help bloggers and website owners to create and maintain their websites. Check out the services I offer here so you can make use of them. For cutting-edge business tips, please head over to Jane Sheeba.

Reader Interactions

Comments

  1. Shivdas Kanade

    September 10, 2019 at 7:03 pm

    I was facing same issue, thanks for sharing in simple way.

    Reply
    • Jane Sheeba

      September 14, 2019 at 5:41 pm

      You are welcome 🙂

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

SUBSCRIBE

YourChannel: Wrong Shortcode

CREATE COMPELLING CONTENT FOR YOUR BLOG LIKE A PRO

QUIT DREAMING ABOUT BECOMING A SUCCESSFUL BLOGGER AND ACTUALLY BECOME ONE!

Jane

Claim your FR​EE access to the Blogging Success Foundation Course.

Popular Posts

  • How to troubleshoot a 500 internal server error in...
  • How to add Google Search Bar widget to your websit...
  • How to set up a professional email address and con...
  • 10 Best Exit Intent Popup plugins for your WordPre...
  • How to remove query strings from CSS and JS in Wor...

The email marketing service I use and trust!


Start Your Free Trial Today!

Footer CTA

About Jane

I'm Jane, the owner of Best Hosting And Design, where I help bloggers and website owners to create and maintain their websites. Check out the services I offer here so you can make use of them. For cutting-edge business tips, please head over to Jane Sheeba.

Jane Sheeba: View My Blog Posts

Popular Posts

Don’t miss another update from us!

(c) Copyright 2022 Design and hosting by Best Hosting And DesignBlog Write for us Sitemap Contact