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.
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
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Image Placeholder”, insert it. Category: Media.
- Configure inspector controls that exist on this block. Open Content. Set “Show Title”, “Content — Title”, “Default Width (px)”, “Default Height (px)”.
- 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
| Control | What the code does |
|---|---|
| Show Title | On/off toggle in the inspector. On by default. Saved as `showTitle`. |
| Content — Title | Text 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 Theme | Select control; the chosen value is saved on the block. Options: Flat; Gradient; Pattern. block.json default: flat. Saved as `defaultTheme`. |
| Show Aspect Ratio Presets | On/off toggle in the inspector. On by default. Saved as `showAspectPresets`. |
| Show Theme Selector | On/off toggle in the inspector. On by default. Saved as `showThemeSelector`. |
| Show Download Button | On/off toggle in the inspector. On by default. Saved as `showDownloadBtn`. |
| Show Copy Data URI | On/off toggle in the inspector. On by default. Saved as `showCopyUriBtn`. |
| Show Copy URL Button | On/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 Color | Color control in the inspector. block.json default: #6366f1. Saved as `accentColor`. |
| Default BG Color | Color control in the inspector. block.json default: #cccccc. Saved as `defaultBgColor`. |
| Default Text Color | Color control in the inspector. block.json default: #555555. Saved as `defaultTextColor`. |
| Section Background | Color control in the inspector. block.json default: #f5f3ff. Saved as `sectionBg`. |
| Card Background | Color control in the inspector. block.json default: #ffffff. Saved as `cardBg`. |
| Title Color | Color control in the inspector. block.json default: #3730a3. Saved as `titleColor`. |
| Label Color | Color control in the inspector. block.json default: #374151. Saved as `labelColor`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts, data-theme.
- Drawing happens on a canvas element after the page loads.
When this is the right block
- Generate custom placeholder images using Canvas. Set dimensions, colors, text, and download or copy the data URI — that is the job of Image Placeholder, not a generic content block.
- Use it when you need the editor control labeled “Show Title”, which exists on this block’s inspector.
- It matches pages about placeholder, image, canvas.
- Inserter grouping: video, animation, and rich media sections.
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
Device Mockup
Display a screenshot or image inside a realistic device frame — phone, tablet, laptop, or browser window.
Hotspot Image
Image with interactive hotspot pins that reveal tooltips on hover or click.
Image Accordion
Expandable image panels that stretch open on hover or click — ideal for showcasing portfolios, services, or locations.
Image Box
A clickable image card with overlay title, hover effects, and a link.
Image Filter
Upload an image and apply real-time CSS filter adjustments — brightness, contrast, saturation, hue, blur, sepia, grayscale, and more. Choose from presets or build a custom look. Optionally expose live filter sliders to visitors.
Image Magnifier
Image with a zoom lens that follows the cursor on hover — perfect for product photography and detail shots.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Image Placeholder from the Gutenberg inserter.