Hosting Tutorial & Guide

How to Fix the Common WordPress Image Issues

updated on Dec 18, 2015
How to Fix the Common WordPress Image Issues Images are an important component of a modern WordPress site as they not only enrich your content, but also improve the browsing experience. However, beginners may come across many issues and obstacles when uploading or using images on a WordPress site. For example, the image uploading fails, or some images are not displayed properly in posts.

We have picked up the most common questions related to image uses in WordPress, and in below, you will find the answers. Some hidden WordPress features and image optimization tips are also introduced.

1. How to Fix WordPress Error Uploading Images?

We have seen some WordPress users get stuck with a problem that images cannot be uploaded in WordPress or even if images are uploaded successfully, they are showed as broken in the media library. Sometimes WordPress warns that it is unable to create the target directory.

There are several possible fixes to this problem, just as listed below. You can try them one by one to find the exact solution that works for you.
  • Change the file permissions of the /wp-content/uploads folder to 744 or 755. This could be done with a web-based file manager or an FTP client.
  • Visit "Settings" > "Media" in WordPress admin area and uncheck the option for organizing uploads. Using the default uploads folder should fix the uploading issue.
  • Try disabling the plugins on your WordPress site to see whether a plugin is causing the problem.

2. How to Display Images in Columns?

For photography sites, it is a common need to display images in columns so that the images seem organized. To sort images in this way, you don't have to install any plugin because WordPress comes with a built-in gallery feature which is easy-to-use.

When editing a post or page, you will notice an "Add Media" button on the top left of the post editor. Just click on it, and on the pop-up window, choose "Create Gallery". Now you can select the images that you want to include in the gallery from the media library, or upload new files depending on your needs. Edit the title and alt text of each image individually, and then click on the creation button on the right bottom of the page.

Create an Image Gallery

On the next page, you can change the order of the images, choose the number of columns, and select a size for the images. At last, click on the "Insert Gallery" button. If you are using the visual editor, you will now see a photo gallery, and if you are using the text editor, a gallery shortcode is added automatically. Preview the post/page to check whether the images are displayed in the way you want.

Display Images in Columns

3. How to Crop Images in WordPress?

Sometimes you may find the uploaded images are too big, which is not good for display and site performance. In such a case, you could re-edit the images on the local computer and then upload them again to your WordPress site. However, there is an easier way since WordPress comes with a feature for cropping images to any size.

To crop an image in WordPress, you should first go to the media library, find the image and click on it to enter the details page. Under the image, you will see an "Edit Image" button which leads to an image editor. Now click on the image and drag to the dimensions you need. To control the dimensions more accurately, you can manually input the aspect ratio or enter the width and height in pixels.

Crop Images in WordPress

When you have selected the right size, click on the crop icon above the image and then save the new image.

4. How to Add Custom Header and Background Image?

If you do not like the default header images of your WordPress theme, you can upload your own easily in "Appearance" > "Header". After entering the theme customization panel, you have to click on the "Header Image" menu.

Header Image

Now you can see the current header and a button of "Add new image". Besides, WordPress also shows the header size recommended for your current theme.

Add a New Header Image

In the case that you have uploaded multiple header images for a single theme, you can display all of them randomly with the randomizing option which is located below the uploaded images, or use a fixed one by clicking on the image and making sure it is shown under "Current header".

Setting up a custom background image is the same easy. As soon as you click on the "Background Image" menu, you get an option to change the current background image by uploading a new one. There are some options for background repeat, position and attachment, which you can change based on your preference.

Add a Custom Background Image

After changing the header or background image, remember to click on the "Save & Publish" button to take the changes into effect.

5. How to Sort Images with Tags?

WordPress provides a great image uploader and some basic photo editing tools. However, there is no sorting option for image-rich sites. If you mainly deal with images on your site, for example, running a photography blog, you will find it is hard to sort the images into groups by using the default WordPress functionalities.

A good solution for this problem is to install the WP MediaTagger plugin which allows you to add tags to images so that your users can browse images by tag. The plugin uses WordPress post tags, so you can create the tags used for images in "Posts" > "Tags".

6. How to Require a Featured Image for All Posts?

Most WordPress blogs nowadays use featured images. However, if you are running a multi-author blog, there may come the case that some authors forget to add a featured image when publishing a post. To prevent this issue, you should always remind yourself and other users of the featured image.

The good news is that you can force all users to add a featured image when submitting a post by installing the plugin – Require Featured Image. Once the plugin is activated, it displays a notification in the post editing screen if a post is without a featured image. Such posts cannot be published until a featured image is added.

Require a Featured Image for All Posts

7. How to Set a Fallback Featured Image?

Besides forcing featured images, you can also ensure all posts including a featured image by setting a fallback which works as the default featured image when no new image is selected. Such a fallback is great if you do not bother making a new image or some authors forget the featured image.

For the selection of the fallback image, you can choose either option in below.
  • Use a specific branded image. For this option, you should make sure the image does not look awkward with any of your post.
  • Use the first image added in the post.
The detailed steps for both options are included in this tutorial.

8. How to Find Loyalty-Free Images for Your WordPress Blog?

Not everyone has the time and expertise to create custom images every time when adding a post, so most bloggers find and use others' images online. The difficult part is that you must only use those images legally allowed for public use due to copyright issues. That's why you need some good resources with sufficient loyalty-free images to choose from.

Below are three of the top resource sites offering photographs that are either loyalty-free or in a public domain. None of these sites requires attribution.
  • PhotoPin – This site includes millions of free photos and you can always find some good ones for you blog by taking advantage of the search box on the homepage.
  • Unsplash – It offers numerous high-resolution photos for free and releases new photos under the CC0 (Creative Commons 0) license on a regular basis.
  • Pixabay – This site includes not only high-quality photos, but also free vectors and videos.
Find Loyalty-Free Images