How to hide gray image placeholders in your theme

Easily disable image placeholders in your WordPress theme

Most of our WordPress themes are supposed to be used to create professional online magazines, dynamic news websites or other editorial websites from any content genre and these kind of websites usually heavily rely on images. However, sometimes there are rare cases where you want to create a website that doesn’t make use of images and this article covers how you can get rid of the image placeholders in case you haven’t uploaded featured images for your articles.

Due to the purpose and structure of professional modern editorial websites, images are a very important aspect in order to run an appealing and well structured website. You probably won’t see many leading online magazines or news websites nowadays that don’t heavily make use of images. Usually the articles on these professional websites include at least one high-quality image.

Food Magazine
Images are crucial in order to run modern professional editorial websites

Uploading images to your articles is not only beneficial for the reading flow of the particular article, but articles with high-quality images usually also are much more appealing and can give your website a professional touch. In addition it’s a fact that providing images within your content can have positive effects on your rankings in search engines which can result in an increase of traffic.

The purpose of image placeholders

If you haven’t uploaded featured images to your posts, your WordPress theme usually will display image placeholders on archives and within widgets to ensure that your layout looks well-organized and consistent, even if you haven’t uploaded an image for every article on your website.

Image Placeholders on Archives
Gray image placeholders will appear when you’ve not uploaded featured images

By default your WordPress theme will display gray and neutral image placeholders, but you can easily replace these with your own versions that include your branding, like your logo or else, or simply replace them with an image you find appealing. You can find the files for the image placeholders within the /images folder of your WordPress theme. Simply replace them with your own branded image placeholders by using a FTP client and the theme will use your versions instead.

How to hide image placeholders on your website

Although it’s highly recommended to make use of featured images on your website, especially if you plan to run professional online magazines or news websites, but there might be rare cases where you don’t want to upload images for some reason. In that case it would be possible to simply hide the image placeholders with some CSS:

.mh-image-placeholder { display: none; }

You can add this custom CSS code in your WordPress dashboard under Appearance => Customize => Theme Options => Custom CSS. In case your WordPress theme doesn’t have this section included, you can make use of plugins like Simple Custom CSS in order to add custom CSS code to your website. You can learn more about CSS customizations in this article: Basic CSS Tutorial to add Custom CSS to your WordPress Website.

Sources for high-quality free images

Pixabay
Pixabay.com is a great source for free high-quality and CC0 licensed images

We noticed that usually the reason why people don’t use images on their website isn’t that they don’t want to use images, but that they simply don’t have suitable free images at hand. High-quality images can be quite expensive, especially when purchasing them from professional agencies. But luckily there are lots of sources where you can find high-quality images for free and often you are not even required to link to the image source from your website. You can find an overview of some great images sources in this article: 10 Image sources for your WordPress website or blog.

Additional resources regarding images in WordPress

We hope this article was helpful in order to explain the purpose of image placeholders within your WordPress theme and why it makes sense and is highly recommended to upload featured images to your articles. In case you have additional questions about the handling of images within WordPress, these resources might be helpful as well:

This article also helped users with the following questions:

  • How to remove grey boxes if no images are used
  • How do I turn off featured images
  • Eliminating the featured image gray box for posts
  • Why only a grey box shows up in place of an image
  • How to remove the empty spaceholders if no images have been uploaded
  • How to display only text on archives without images
  • How to customize theme so it doesn’t show gray boxes on homepage
  • Why are just gray boxes appearing for images

Share this with your friends

4 Comments

  1. Embedded videos show up on the individual posts, but do not show up on category pages or on the static homepage. Only a grey box shows up in place of the video. Thank you, Ken

  2. Hi, I’ve set featured images so I have thumbnail images instead of grey image placeholders. But when I do that, a large image gets added to the top of each post. Is there a way to have a featured image but not add that image to the top of the posts?

Leave a Comment

Your email address will not be published.


*