Block Editor Image Filename Prompt

Plugin Banner

Block Editor Image Filename Prompt

by aiwos

Download
Description

Block Editor Image Filename Prompt improves the image paste workflow in the WordPress block editor (Gutenberg). When an editor pastes an image, the plugin opens a dialog for filename and media details, uploads the image to the Media Library, and inserts it as a core Image block.

By default, pasted images often get generic names such as image.png, blob.png, or screenshot.png. This plugin helps editors choose clear filenames and add useful metadata before the image reaches the Media Library.

Features:

  • Prompt for a filename before pasted images are uploaded.
  • Add alternative text, media title, caption, and description during upload.
  • Smart filename presets based on the current post title and date.
  • Automatic filename sanitizing for cleaner, safer filenames.
  • Final filename preview before upload.
  • Correct file extension based on image type, including JPG, PNG, GIF, WebP, AVIF, BMP, and TIFF.
  • Paste support for clipboard image files, image URLs, and copied HTML images where the image URL is available.
  • Works in the block editor canvas, including the iframe editor canvas.
  • Direct upload to the WordPress Media Library through the REST API.
  • Automatic insertion as a WordPress core Image block with alt text and caption when provided.
  • Runs only for users who can upload files.

Use it to:

  • Give pasted screenshots and images meaningful filenames.
  • Add accessibility-friendly alt text while the upload is still in context.
  • Keep the WordPress Media Library easier to search and manage.
  • Avoid duplicate or unclear image names.
  • Improve image organization and SEO hygiene before files are uploaded.
  • Speed up editorial workflows for teams that paste many screenshots, copied web images, or generated images.

Built by Aiwos, a digital studio that builds smart WordPress solutions, AI-powered workflows, and custom web applications for organizations that want practical automation.

Source code is available in the GitHub repository. Please report issues, suggest improvements, or submit pull requests there.

Development note: build/index.js is the compiled output. The human-readable source is src/index.js.

  1. Upload the plugin files to the /wp-content/plugins/block-editor-image-filename-prompt directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the “Plugins” screen in WordPress.
How do I use this plugin?

Paste an image into the WordPress block editor. A dialog appears before upload. Choose a filename preset such as post title, post title plus date, or date only, or enter your own filename. Optionally add alt text, title, caption, and description. The plugin sanitizes the filename, uploads the image, updates its media details, and inserts it as an Image block.

What image sources does it support?

The plugin supports pasted clipboard image files, image URLs, and copied HTML images when the image URL is available in the clipboard data.

Who can use the prompt?

Only logged-in users with permission to upload files can use the plugin.

1.0.1

  • Add image metadata fields and improve paste workflow documentation.

1.0

  • Initial release.
Back to top