Skip to content

How to Add an Image on a Button in WordPress?

Key Takeaways

  • Nexter Blocksの無料Advanced Buttonブロックは、Media Libraryの画像をボタン内に入れ、テキストの前後に配置できる。
  • Icon TypeのImage設定は、font icon、image、SVGの切り替えを可能にし、Image SizeでWordPressが配信するファイルを選べる。
  • ボタン全体は1つのクリック可能なリンクのままで、画像のalt textはMedia Libraryから引き継がれ、スクリーンリーダー向けのラベルになる。
  • styles 3, 6, 7, 9は独自の矢印を描画してiconを表示せず、styles 6と17ではIcon Positionが表示されない。
Table of Contents

A small image inside a button, such as an app store badge or a phone icon, tells visitors what the button does before they read it. The free Advanced Button block in Nexter Blocks can place an image inside the button next to its text.

What It Does

It puts an image from your Media Library inside an Advanced Button, before or after the button text. It is the Image option of the block’s icon setting, so the same button can use a font icon, an image or an SVG instead.

Why It Matters

A recognisable image such as a store badge or a phone symbol makes the purpose of a button clear at a glance, and it keeps the button as one clickable link instead of an image placed beside a button.

What You Get

  • An Icon Type choice that includes Image.
  • A Media Library picker and an Image Size choice, which sets which file WordPress serves.
  • Icon Position (Prefix or Postfix), Icon Spacing and Icon Size controls on the Style tab.

Benefits

  • The image is part of the button link, so the whole button stays clickable.
  • The button takes the image’s alt text from the Media Library, so screen readers get a label.
  • It works in the free Nexter Blocks plugin and with Nexter Blocks Pro.

Capabilities

  • Place the image before (Prefix) or after (Postfix) the text.
  • Pick any registered WordPress image size for the file that is served.
  • Change the displayed size with Icon Size, separately from the file size.
  • Works with the Advanced Button styles that show an icon (see Limitations).

How It Works

The block reads the image you chose and prints it through WordPress at the Image Size you picked, with the class btn-icon. It sits inside the button link, in front of or behind the text depending on Icon Position. If the image has no alt text, the block uses the image title, and if there is no title it uses the word “Button”.

How to Use It

Before you start: switch on the Advanced Button block under Nexter > Blocks in your WordPress dashboard, and prepare a small PNG or SVG with a transparent background.

  1. Add the Advanced Button block, pick a style and type the button text.
  2. Open the Icon panel and set Icon Type to Image.
The Icon panel with Icon Type set to Image
  1. Choose your image and a small Image Size, such as Thumbnail.
  2. On the Style tab, open Icon to set Icon Position (Prefix for before the text, Postfix for after it), Icon Spacing and Icon Size.
  3. Save, then view the live page.
A Call Now button with a phone image

Use Cases

  • An app store badge as a download button.
  • A phone image on a Call Now button.
  • A payment or brand logo on a checkout link.
  • An arrow or flag image where a font icon does not match your brand.
Front end of a Nexter Blocks Button with an image icon before the text

Limitations

  • Image Size decides which file WordPress serves. A large size adds page weight even if Icon Size makes it look small.
  • Icon Size sets the image width and height to the same value, so a wide badge can look stretched. Choose an image that is close to square.
  • The Icon Position control is not shown for styles 6 and 17.
  • Some button styles (3, 6, 7 and 9) draw their own arrow and do not show the icon. Switch style if the image does not appear.

Troubleshooting

The image is too big

Set Icon Size on the Style tab and choose a smaller Image Size. The first changes how large it looks, the second changes the file that loads.

The image does not show on the page

Check the button style. Styles 3, 6, 7 and 9 use their own arrow instead of the icon. Also confirm Icon Type is set to Image and that an image is chosen.

The image has the wrong description for screen readers

The block uses the alt text from the Media Library, then the image title, then “Button”. Add alt text in the Media Library for the file.

Suggested Reading

Share your Thoughts

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

How do I add an image inside a WordPress button without breaking the click area?

The image needs to live inside the Advanced Button block, not beside it, because that keeps the whole button as one clickable link. Nexter Blocks puts the image before or after the text through the block’s icon setting, so the badge or icon becomes part of the button itself. That matters for app store badges and phone buttons, where a separate image would split the click target and make the button feel clumsy.

What kind of image works best for a button in WordPress?

A small PNG or SVG with a transparent background is the safest choice. The page calls out app store badges and phone symbols as good examples, because they communicate the action instantly without crowding the label. In Nexter Blocks, the image comes from your Media Library, so picking a clean asset matters more than adding a large graphic and shrinking it later.

Why is my button image showing up too large even after I resize it?

Icon Size only changes how large the image looks, while Image Size controls which file WordPress serves. If you pick a large Image Size, the page still loads that heavier file even when it appears small on screen. The practical fix is to choose a smaller Image Size such as Thumbnail and then fine-tune the display with Icon Size on the Style tab.

What should I do if the image does not appear on my button?

The most common cause is the button style. Styles 3, 6, 7 and 9 draw their own arrow instead of showing the icon, so the image will not appear there. Also confirm that Icon Type is set to Image and that an image has actually been chosen. In Nexter Blocks, switching to a style that supports icons is often faster than troubleshooting the asset itself.

When should I use an image on a button instead of a font icon?

Use an image when the visual needs to match something specific, like an app store badge, payment logo, or brand mark. The page also notes that an image can work better when a font icon does not match your brand. Nexter Blocks lets you use Image as the icon type in Advanced Button, so you are not locked into font icons or SVGs.

How does WordPress decide what screen readers read for a button image?

The block uses alt text from the Media Library first. If there is no alt text, it falls back to the image title, and if that is missing too, it uses “Button.” That makes Media Library metadata important for accessibility, because screen readers depend on it when the image is part of the clickable control. Nexter Blocks also keeps that label tied to the button link itself.

Last reviewed: November 20, 2026

Related Docs