Media · Gutenberg

Image Placeholder block for WordPress

Generate custom placeholder images using Canvas. Set dimensions, colors, text, and download or copy the data URI.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Generate custom placeholder images using Canvas. Set dimensions, colors, text, and download or copy the data URI.

Inspector panels on this block: Content, Default Settings, Features. Those titles come from index.js, not from a shared template.

Behavior controls: “Default Theme” options: Flat, Gradient, Pattern.

Where to find it

Gutenberg inserter → Media → search “Image Placeholder” (block name `blockenberg/image-placeholder` in block.json). Style it in the sidebar after insert.

How to use Image Placeholder block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Image Placeholder”, insert it. Category: Media.
  3. Configure inspector controls that exist on this block. Open Content. Set “Show Title”, “Content — Title”, “Default Width (px)”, “Default Height (px)”.
  4. Check the published page. The view script reads HTML data attributes: data-opts, data-theme. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Show TitleOn/off toggle in the inspector. On by default. Saved as `showTitle`.
Content — TitleText field in the inspector. block.json default: Image Placeholder Generator. Saved as `title`.
Default Width (px)Numeric range control in the inspector. Range 50–2000. block.json default: 800. Saved as `defaultWidth`.
Default Height (px)Numeric range control in the inspector. Range 50–2000. block.json default: 600. Saved as `defaultHeight`.
Default Text (blank = dimensions)Text field in the inspector. Saved as `defaultText`.
Default ThemeSelect control; the chosen value is saved on the block. Options: Flat; Gradient; Pattern. block.json default: flat. Saved as `defaultTheme`.
Show Aspect Ratio PresetsOn/off toggle in the inspector. On by default. Saved as `showAspectPresets`.
Show Theme SelectorOn/off toggle in the inspector. On by default. Saved as `showThemeSelector`.
Show Download ButtonOn/off toggle in the inspector. On by default. Saved as `showDownloadBtn`.
Show Copy Data URIOn/off toggle in the inspector. On by default. Saved as `showCopyUriBtn`.
Show Copy URL ButtonOn/off toggle in the inspector. On by default. Saved as `showCopyUrlBtn`.
Max Width (px)Numeric range control in the inspector. Range 400–1200. block.json default: 800. Saved as `contentMaxWidth`.
Accent ColorColor control in the inspector. block.json default: #6366f1. Saved as `accentColor`.
Default BG ColorColor control in the inspector. block.json default: #cccccc. Saved as `defaultBgColor`.
Default Text ColorColor control in the inspector. block.json default: #555555. Saved as `defaultTextColor`.
Section BackgroundColor control in the inspector. block.json default: #f5f3ff. Saved as `sectionBg`.
Card BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `cardBg`.
Title ColorColor control in the inspector. block.json default: #3730a3. Saved as `titleColor`.
Label ColorColor control in the inspector. block.json default: #374151. Saved as `labelColor`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Image Placeholder block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Image Placeholder”. It sits under Media. After insert, open Content and set “Show Title”, “Content — Title”, “Default Width (px)”, “Default Height (px)”.

What makes Image Placeholder different from other Blockenberg blocks?

Generate custom placeholder images using Canvas. Set dimensions, colors, text, and download or copy the data URI. Inspector labels on this block include “Show Title”, “Content — Title”, “Default Width (px)”, “Default Height (px)”.

Is the Image Placeholder Gutenberg block free?

Yes. Image Placeholder ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Image Placeholder to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Content, Default Settings, Features).

Related media blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Image Placeholder from the Gutenberg inserter.

Get Blockenberg