Title: Clear Media Title On Upload
Author: runthings.dev
Published: <strong>2026 年 1 月 27 日</strong>
Last modified: 2026 年 1 月 27 日

---

搜尋外掛

![](https://ps.w.org/runthings-empty-media-title/assets/banner-772x250.png?rev=3447837)

![](https://ps.w.org/runthings-empty-media-title/assets/icon-256x256.png?rev=3447837)

# Clear Media Title On Upload

 由 [runthings.dev](https://profiles.wordpress.org/runthingsdev/) 開發

[下載](https://downloads.wordpress.org/plugin/runthings-empty-media-title.2.0.1.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/runthings-empty-media-title/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/runthings-empty-media-title/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/runthings-empty-media-title/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/runthings-empty-media-title/#developers)

 [技術支援](https://wordpress.org/support/plugin/runthings-empty-media-title/)

## 外掛說明

When you upload media to WordPress, the title field is automatically set to a slugified
version of the filename. This often results in messy, unoptimized titles like “IMG-
20240115-photo-final-v2” appearing in gallery captions, alt tags, or title attributes.

This plugin clears the title field for newly uploaded media, ensuring that if a 
title is displayed anywhere, it’s one you’ve intentionally set yourself.

#### Features

 * Automatically clears the title field for new media uploads
 * Bulk action to clear titles on existing media library items
 * Lightweight with no settings page required
 * Developer-friendly with filters

#### How It Works

The plugin hooks into WordPress’s `wp_insert_attachment_data` filter and clears 
the `post_title` field for new uploads before they are saved to the database.

### Filters

#### runthings_emt_skip

Skip clearing the title for specific attachments.

**Parameters:**

 * `$skip` (bool) – Whether to skip clearing the title. Default false.
 * `$data` (array) – Attachment post data (slashed, sanitized, processed).
 * `$postarr` (array) – Sanitized post data (not processed).
 * `$unsanitized_postarr` (array) – Unsanitized post data.
 * `$update` (bool) – Whether this is an update (always false for new uploads).

**Example:**

    ```
    // Skip clearing title for uploads by specific user
    add_filter('runthings_emt_skip', function($skip, $data, $postarr) {
        if (get_current_user_id() === 1) {
            return true; // Admin keeps auto-generated titles
        }
        return $skip;
    }, 10, 3);



    // Skip clearing title if filename contains "keep-title"
    add_filter('runthings_emt_skip', function($skip, $data, $postarr) {
        $filename = $postarr['post_title'] ?? '';
        if (strpos($filename, 'keep-title') !== false) {
            return true;
        }
        return $skip;
    }, 10, 3);
    ```

#### runthings_emt_mime_types

Filter which MIME types should have their title cleared. By default, all media types
are affected.

**Parameters:**

 * `$allowed_mime_types` (array) – Array of MIME type patterns. Default `[]` (all
   types).
 * `$attachment_mime_type` (string) – The attachment’s MIME type.
 * `$postarr` (array) – Sanitized post data.

**Example:**

    ```
    // Restrict to images only
    add_filter('runthings_emt_mime_types', function($allowed_mime_types) {
        return ['image'];
    });



    // Restrict to images and PDFs only
    add_filter('runthings_emt_mime_types', function($allowed_mime_types) {
        return ['image', 'application/pdf'];
    });
    ```

### Additional Notes

Built by Matthew Harris of runthings.dev, copyright 2022-2026.

Visit [runthings.dev](https://runthings.dev/) for more WordPress plugins and resources.

Contribute or report issues at the [GitHub repository](https://github.com/runthings-dev/runthings-empty-media-title).

Insert space by Xinh Studio from Noun Project, https://thenounproject.com/browse/
icons/term/insert-space/ (CC BY 3.0) – https://thenounproject.com/icon/insert-space-
239543/

Image by David Khai from Noun Project, https://thenounproject.com/browse/icons/term/
image/ (CC BY 3.0) – https://thenounproject.com/icon/image-661355/

## 螢幕擷圖

 * [[
 * Before: Image uploaded with auto-generated slugified title. After: Image uploaded
   with empty title field.

## 安裝方式

 1. Upload the plugin files to the `/wp-content/plugins/runthings-empty-media-title`
    directory, or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress.
 3. That’s it! New media uploads will now have an empty title field.

## 常見問題集

### Does this affect existing media in my library?

New uploads are cleared automatically. For existing media, you can use the bulk 
action in the Media Library to clear titles on selected items.

### Can I restrict this to certain file types?

Yes! Use the `runthings_emt_mime_types` filter to limit which MIME types are affected.
See the Filters section below.

### Can I exclude certain uploads from having their title cleared?

Yes! Use the `runthings_emt_skip` filter to conditionally skip clearing the title.
See the Filters section below.

### Why would I want an empty title?

Many themes and plugins display the media title in various places – gallery captions,
lightbox overlays, or HTML title attributes. An auto-generated slugified filename
like “DSC-0042-final-edit” looks unprofessional. With an empty title, you’re in 
control of what gets displayed.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Clear Media Title On Upload〉的開發相關工作。

參與者

 *   [ runthings.dev ](https://profiles.wordpress.org/runthingsdev/)

[將〈Clear Media Title On Upload〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/runthings-empty-media-title)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/runthings-empty-media-title/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/runthings-empty-media-title/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/runthings-empty-media-title/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/runthings-empty-media-title/)。

## 變更記錄

#### 2.0.1 – 23rd January 2026

 * Improved bulk action messages
 * Add confirmation prompt to bulk edit list view
 * Fixed nonce verification in bulk action processing

#### 2.0.0 – 23rd January 2026

 * Complete plugin refactor with namespaced class structure
 * Added bulk action “Clear media title” to clear titles on existing media items
 * Changed default from `['image']` to `[]` (all media types)
 * Added `runthings_emt_skip` filter for developer customization
 * Added `runthings_emt_mime_types` filter to extend beyond images

#### 1.0.0 – 6th January 2022

 * Initial release

## 中繼資料

 *  版本 **2.0.1**
 *  最後更新 **4 個月前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 6.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.9.4**
 *  PHP 版本需求 ** 7.4 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/runthings-empty-media-title/)
 * 標籤:
 * [attachment](https://tw.wordpress.org/plugins/tags/attachment/)[images](https://tw.wordpress.org/plugins/tags/images/)
   [media](https://tw.wordpress.org/plugins/tags/media/)[title](https://tw.wordpress.org/plugins/tags/title/)
   [upload](https://tw.wordpress.org/plugins/tags/upload/)
 *  [進階檢視](https://tw.wordpress.org/plugins/runthings-empty-media-title/advanced/)

## 評分

這個項目尚無任何評論記錄。

[Your review](https://wordpress.org/support/plugin/runthings-empty-media-title/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/runthings-empty-media-title/reviews/)

## 參與者

 *   [ runthings.dev ](https://profiles.wordpress.org/runthingsdev/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/runthings-empty-media-title/)