Without pictures, the Internet would only be half as interesting - or maybe even less. Fortunately, it's quite easy to add new pictures under WordPress. But unfortunately even the upload is not free of errors. Every now and then it happens that single pictures - or all pictures - are no longer accepted. What you can do in this case, we summarize in our tutorial on this topic.

picture upload
with mistakes: Not so easy

Getting pictures into the media library of WordPress is usually not that difficult. The corresponding files are simply dragged and dropped into the media library or inserted into the article at the appropriate place. This often happens so unimportantly that you don't even have to worry about the upload - apart from possible copyright infringements, of course.

Nevertheless, it can sometimes happen that the image upload goes on strike. In this case there is usually an error message, which describes sometimes well and sometimes less well, why the upload is not possible. The error messages can basically be divided into two categories. Either something is wrong with the picture itself - or the server on which WordPress is installed simply refuses to accept the picture.

However, it is also clear that a correction is usually possible relatively quickly. Deep knowledge of WordPress is rarely required. Or to put it differently: The errors can often be corrected quickly.

Upload from
pictures: Pay attention to file name and image format

Even today it can still cause problems,
if pictures have file names that contain German umlauts or special characters
own. Although the upload is often accepted here, the display in the
Browser may be faulty. To be on the safe side, the
umlauts and special characters, for example, a turns ae into ae and ß into
ss.

The same applies to blanks, which are not supported by every browser
can be interpreted in the same way.

The image format itself should also be looked at carefully. WordPress has no problems if the images are saved in common formats like jpg, gif. or .png are present. The situation is different with specific file extensions, such as those found in Photoshop. With .psd WordPress and the browser simply cannot do anything.

Convert your images into common formats that can be displayed in any browser. An optimization of images before uploading is also useful. More about this in the rest of this article.

Upload
not possible - but maybe only temporarily?

If you are sure to upload images with accepted endings and without special characters / umlauts, then it may be the easiest solution to upload again. Maybe the internet connection was lost for a short time and the upload was interrupted.

So before you start looking for possible errors, just upload the files again. This also makes sense if the server was perhaps overloaded for a short time and can now accept new commands again.

The server
is full: simply no more space

The possibility that the
available space on the server might simply be full. In this
In this case you can go on a search for yourself and use the no longer needed
Simply remove files. Before doing so, it is of course a good idea to make a backup
create.

If you really still need all the files or don't dare to delete things easily, it may make sense to switch to a larger package from your hosting provider. This is more expensive, but you can be sure that there will be more space available in the future - and not only for pictures.

Sometimes the "hosters" do not really actively communicate the problem of insufficient memory. That means your WordPress gives an error message that a graphic cannot be uploaded, but you don't really know why! Possibly the memory of your hoster is full.

Wrong
Rights of the upload folder

For error messages such as "The uploaded file could not be
to "wp-content/uploads" the matter is quite clear. The
wp-content/uploads folder does not have the necessary rights to create new
to place files.

In this case, you log in via FTP on your server - or you browse through the directories in the customer area of the hosting provider - and assign the rights 755 to the folder wp-content/uploads via chmod. In many cases, a right click on the folder is enough to find a corresponding menu.

The PHP
Memory Limit is too low

This annoying error occurs especially with smaller
hosting packages. I guess you don't have enough memory here
...to be asked. When uploading larger files, there is then a
Error message like "Fatal error: Allowed memory size of xxxxxx bytes exhausted".
The message usually appears not only when uploading images,
but also when installing plugins and updating
WordPress itself.

There are several ways to increase the PHP memory limit. One way is to add a new line to the configuration file wp-config.php in the root directory of the WordPress installation. So open this file and add this here inside the PHP brackets:

define('WP_MEMORY_LIMIT', '256M');

This increases the PHP memory limit to 256 MB, which should be sufficient in many cases. Alternatively, the increase of the memory limit can be specified in the php.ini file if you have access to it.

Upload error:
Selects a different image library

WordPress - or rather PHP - uses two
image libraries, GD Library and Imagick, depending on which are available
is standing. Especially with Imagick there are more often problems with the memory limit
from PHP. So you can tell WordPress to always set GD Library as default to
use.

To do this, add the following code snippet to the file functions.php, which you can find in the Theme folder:

function wpb_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', 'wpb_image_editor_default_to_gd' );

Another way to persuade WordPress to use only one of the two libraries is the file .htaccess in the root directory of WordPress. Here you can instruct the server to accept only single threads from Imagick. This way HTTP-errors while uploading pictures can disappear under certain circumstances. Add this line:

SetEnv MAGICK_THREAD_LIMIT 1

The
Media library shows no pictures? PHP version too low

If the media library of WordPress suddenly does not have
show more pictures, then you have probably just before on a new
Version of WordPress updated. But now the version of PHP, the
installed on the server is too low. For hosting packages, almost
no way around contacting the hoster. Ask him to make
to install a newer version of PHP.

If you can set the PHP version yourself in the customer menu of the hosting provider, then you can easily set a newer version here - of course after a backup of the website including database.

At the end
another plugin tip: EWWW Image Optimizer

In order not to encounter even more problems during the upload, a plugin for optimizing the images is recommended. Extensions like for example EWWW Image Optimizer compress images exactly as you wish and also set the dimensions (width and height) according to your own ideas.

If you prefer to work without an additional plugin
can of course also download his pictures directly to his computer with a program
optimize. Online services such as TinyPNG on. Pictures - not only .png
- automatically reduces the file size, which leads to fewer problems with
Upload leads. As a nice side effect, the images load faster, which is
Google makes a positive impact.

Bottom line:
Upload of pictures is not possible - you can do that now

The image upload from WordPress usually works without
bigger problems. Should difficulties arise nevertheless, these
quickly out of the world. The most common problems including solution have
is summarized for you in this article.

If you run into difficulties more often, you can
recommend the change to a more comprehensive hosting package. Also a
optimized image processing before the actual upload is always recommended.

This might interest you too:

Lazy load without plugin

Lazy Load for images (without plugin)

wordpress image optimization

Optimize WordPress images

Alt-Tag-the-Pictures-Remove-Only-on-the-Homepage-Snippet-Wordpress

Remove Alt-Tag of images // Only on the start page

About Christian

My name is Christian and I am co-founder of the platform fastWP. Here in the magazine I am responsible for the more "technical" topics but I like to write about SEO, which has been my passion for over 10 years now.

Leave a Comment

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

en_GB