Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPressでメディアタイトルを自動的に追加する方法

コンテンツが豊富なサイトにとって、画像は重要な要素です。画像に適切なタイトルと代替テキストを使用することで、SEOフレンドリーにすることができます。しかし、多くの画像をアップロードしていると、WordPressのメディアファイルに適切なタイトルと代替テキストを追加するのを忘れてしまうことがあります。この投稿では、WordPressでメディアのタイトルを自動的に追加する方法を紹介する。

WordPressがメディアタイトルを処理する方法

WordPressは、メディアアップローダーを使ってアップロードしたすべてのメディアファイルのタイトルとして、ファイル名を自動的に使用します。WordPressでは、altテキストフィールドは空白のままです。WordPressのメディアタイトルは内部でのみ使用され、画像タグのタイトルパラメータとして使用されないことは言うまでもありません。WordPressの画像altテキストと画像タイトルに関する初心者向けガイドをご覧ください。

Default WordPress media title field filled with image file name

動画チュートリアル

Subscribe to WPBeginner

動画が気に入らなかったり、もっと説明が必要な場合は、このまま読み進めてください。

WordPressでメディアのタイトルを自動的にフォーマットする

まず最初に、Format Media Titlesプラグインをインストールして有効化します。有効化したら、設定 ” Format Media Titlesのページでプラグインを設定します。

Format media title settings

このプラグインを使うと、メディアファイル名からハイフンやアンダースコアを取り除くことができます。例えば、メディアファイル名がfruit-basket.jpegの場合、画像タイトルフィールドではfruit basketとなります。初期設定では、プラグインはハイフンとアンダースコアを削除しますが、ファイル名からピリオド、潮、プラス文字を削除することもできます。

Format Media Titlesは、タイトルフィールドの単語を大文字にすることもできます。設定できるオプションはいくつかあります。すべての単語を大文字にすることも、最初の単語だけを大文字にすることもできます。また、すべての単語に小文字または大文字を使用できます。

Misc.オプション」セクションでは、フォーマットしたメディアタイトルを代替テキスト、説明、キャプションの各フィールドに追加できます。代替テキストフィールドにチェックを入れることをお勧めします。こうすることで、画像に代替テキストを追加し忘れた場合でも、このプラグインが自動的にフォーマットされたメディアタイトルをaltテキストとして使用します。

これで、新しい画像をアップロードするたびに、Formatted Media Titlesがタイトルに使用されているファイル名を読みやすくSEOフレンドリーなものに自動的に整形してくれます。

Title and Alt text fields automatically filled

なお、このプラグインはフォーマットされたメディアタイトルをimgタグのタイトルパラメータとして使用しません。その場合は、WordPressで画像にtitle属性を簡単に追加する方法のチュートリアルの指示に従う必要があります。

この投稿がWordPressでメディアタイトルを自動的に追加するのにお役に立てば幸いです。また、ウェブ用に最適化された画像を保存することで WordPress サイトを高速化する方法については、こちらもご覧ください。

この投稿が気に入った場合は、WordPressの動画チュートリアルをYouTubeチャンネルに登録してください。Twitterや Facebookでもご覧いただけます。

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

アバター

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

12件のコメント返信を残す

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. ivan radisson says

    For those who noticed that WordPress changed the way media Titles was handled, worry no more, a fix is ready in the latest WordPress 4.7 :

    Unexpected change to media title behavior in WP 4.6.1

  3. John Abay says

    It really help in my site Web Design, Thanks for sharing. very useful resources to start learning with fundamentals of WordPress. it is very attractive Web Design Ideas.

  4. by.fire says

    Hi,

    I’m really interested in using this plug in but when I downloaded it I had a message saying that it will not work with my version of WordPress (4.2.4). Any suggestions?
    Many thanks

  5. Janice Ridley-Lee says

    This site is fantastic. It’s got everything you need to know about WordPress and there is not only a tonne of information about WP but has info you can use even if you are not a WP user. The people who run this web site deserve everything positive as they obviously work very hard to bring us lots and lots of freebies. Thanks. Janice.

  6. Alex says

    Hi

    Does it still work after you’ve de-activated it?

    I.e. can it be used to fix up an old image library and then de-activated?

    Regards

    Alex

  7. Kate says

    Interesting plug in. I have many thousands of images which require a scan, but unfortunately, this plug in only addresses new uploads after installation. There doesn’t appear to be a batch edit function as the creator indicates he doesn’t yet have the time to add this function to a free plug in. So, developer beware — new images only, are enhanced by this tool.

    • LIZ says

      I send this. I love what it does with new uploads, but I really need something to modify images I already have.

  8. Sallie Goetsch @salliegoetsch says

    This seems like an improvement over the default titles, but for proper accessibility, the ALT tag should actually include a word like “photo” or “illustration” and then a description of the image, not just its title.

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。