Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk3 min

How to Make Images Grayscale in WordPress

Add a CSS class to selected Image blocks and apply grayscale(100%) for a neutral grayscale display effect. Learn how that differs from WordPress duotone and permanent image conversion.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To make selected WordPress images display in neutral grayscale, assign each Image block a CSS class and apply filter: grayscale(100%); to the image. WordPress’s built-in image filter is duotone, which creates a two-color treatment rather than a dedicated neutral grayscale effect.

Choose the right grayscale method

Method What it does Scope Best for
CSS class with filter: grayscale(100%) Displays the image in true grayscale without changing the uploaded file Selected blocks that have the class Neutral black-and-white display or a selective effect
WordPress duotone control Applies a two-color treatment Supported blocks; can also be set as a Global Styles default A stylized or branded look
Convert a copy in an image editor Permanently changes the converted file to grayscale The converted file wherever it is used An asset that must be grayscale outside the page, such as in a download or print

Make a selected image grayscale with CSS

  1. Select the image. Edit the post or page and select its Image block.
  2. Add a class. Open the block’s Advanced settings and enter grayscale-image in the CSS class field.
  3. Add the CSS rule. Put this rule in the custom CSS area available for your site:
    .grayscale-image img {
      filter: grayscale(100%);
    }
  4. Save and check the front end. View the page outside the editor to confirm the image displays in grayscale.

The exact location of custom CSS depends on the theme and site setup. The selector above is practical CSS guidance, not a WordPress-specific guarantee for every theme. If the image stays in color, inspect its rendered markup and theme styles; the class may need to target the image itself or a different wrapper.

What WordPress’s built-in filter does

WordPress documents a duotone control for the Image block and filter controls for Image, Cover, and Gallery blocks. Duotone maps shadows and highlights to chosen colors. Choosing black and white can look grayscale-like, but it remains a two-color treatment rather than a neutral grayscale conversion. WordPress says of its image filter effects: “You can create a filter effect on images without actually changing the original image.” WordPress Image block documentation explains the block controls, while the Filters Settings overview describes Global Styles and supported blocks.

Apply a duotone effect to an image

Select the image and use the block toolbar’s duotone control or the Styles panel if it is available in your editor. The available controls can vary with the theme and site configuration. For background on the color treatment, see WordPress’s Colors Settings overview.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set a filter through Global Styles

Global Styles can set a filter default for existing and new images. This is broader than adding a CSS class to selected blocks, so use a class when only specific images should appear grayscale. The Filters Settings overview covers the Global Styles behavior.

Make the grayscale effect appear on hover

A hover-only grayscale treatment is possible with CSS, but it is not a built-in WordPress editor option. For a class applied to the Image block, a basic pattern is:

.grayscale-image img {
  filter: grayscale(100%);
}

.grayscale-image a:hover img {
  filter: grayscale(0%);
}

This example starts grayscale and restores color when a linked image is hovered. Adjust the initial and hover states to suit the effect you want. Check keyboard focus and touch behavior separately: hover is not equally available on every device, and this example does not define a focus treatment.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep the original color image or replace it?

The CSS method changes how the image is displayed, not the uploaded original. Duotone likewise creates an appearance effect without changing the source image. If you need a permanently grayscale file for reuse outside WordPress, convert a copy in an image editor and upload or substitute that copy; keep the color original if you may need to reverse the change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For details about Image block support and its reference selectors, consult the WordPress Developer Resources Image block reference. WordPress introduced image editing capabilities in the block editor in WordPress 5.5; that history is covered in Make WordPress Core’s 2020 overview, but it is not a complete guide to the current interface.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.