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

WordPressでアニメーションGIFを追加する方法(正しい方法)

GIF(グラフィック・インターチェンジ・フォーマット)は、訪問者の注意を引き、ブログ投稿へのエンゲージメントを高めるのに役立ちます。しかし、WordPressでアニメーションGIFを追加すると、アニメーションが失われ、ただの静止画像として表示される可能性があります。

私たちは以前にもこの問題に直面したことがあるので、トラブルシューティングを行い、その結果を共有することにした。

この記事では、WordPressでアニメーションGIFを適切に追加する方法を順を追って説明します。

How to add animated GIFs in WordPress

WordPressのGIFが正常に動作しないのはなぜですか?

WordPressは自動的に複数のサイズの画像を生成するため、GIFアニメーションが静止画像になることがありますが、これはアニメーションの最初のフレームからだけです。

なぜそうなるのか?

メディアアップローダーを使用してWordPressウェブサイトに画像を追加すると、WordPressは自動的に異なるサイズの画像のコピーを複数作成します。

WordPressの初期設定には、サムネイル、ミディアム、ラージ、フルサイズの4種類の画像サイズがあります。

Image size in WordPress

しかし、アニメーションGIFの新しい画像サイズを作成すると、WordPressはGIFファイルの最初のフレームだけを保存してしまいます。

その結果、生成された画像サイズのいずれかを投稿やページに追加すると、静的な画像となり、WordPress GIFが機能しなくなります。

とはいえ、WordPressでアニメーションを失うことなくアニメーションGIFを適切に追加する方法を見てみましょう。

WordPressでアニメーションGIFを正しく追加する

まず、アニメーションGIFを追加するには、WordPress GutenbergエディターでWordPressの投稿またはページを編集または新規作成する必要があります。

WordPressのコンテンツエディターに入ったら、「+」ボタンをクリックし、Imageブロックを追加します。

Add image block

次に、ImageブロックにアニメーションGIFをアップロードする複数の方法があります。

まずは「アップロード」ボタンをクリックし、コンピューターからアニメーションGIFを選択してください。または、’メディアライブラリ’ボタンをクリックして、すでにアップロードされているメディアファイルをメディアライブラリに追加することもできます。

また、「URLから挿入」ボタンをクリックしてGIFへのリンクを入力するオプションもありますが、これはウェブサイトに画像をアップロードしないのでお勧めしません。

Upload your animated GIF

GIFをアップロードすると、ブロックエディターがコンテンツに挿入し、カスタマイズすることができます。

GIFを追加したら、右側のメニューから「Image size」の下にある「Full Size」オプションを選択する必要があります。

Choose full size as image size

フルサイズの画像は、WordPressにアップロードしたオリジナルのアニメーションGIFです。これを選ぶと、WordPressのGIFが静止画像として表示され、アニメーションが再生されないのを防ぐことができます。

コンテンツエディターですぐにアニメーションを見ることができます。

See GIF preview

アニメーションGIFの動きを見るために、ブログ記事を公開または更新してください。

WordPressでアニメーションGIFを使うためのボーナス・ヒント

ImagelyのGIF画像は通常、他の画像ファイルよりもファイルサイズが大きくなります。それは、アニメーションを作成するためのフレームとして使用される複数の圧縮画像を含んでいるからです。

WordPressのページで大きなGIFを使用したり、GIF画像を追加し過ぎたりすると、サイトの表示速度が遅くなり、検索エンジン最適化(SEO)に悪影響を及ぼす可能性があります。詳しくはWordPressのスピードとパフォーマンスを向上させる究極のガイドをご覧ください。

GIFアニメを探すのにGiphy.comを使っているなら、GIF Masterプラグインがとても便利です。WordPressダッシュボードからGiphyデータベースを検索し、WordPressサイトを離れることなくGIFを追加することができます。

同様に、EmbedPressを使ってGfycatのアニメーションGIFやミームを自動的に追加することもできます。GfycatからGIFのURLを入力するだけで、プラグインがコンテンツに埋め込んでくれます。

WordPressでアニメーションGIFを追加する方法について、この記事がお役に立てば幸いです。画像を管理するための優れたWordPressプラグインのリストや、WordPressに動画を直接アップロードしてはいけない理由についての記事もご覧ください。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

25件のコメントLeave a Reply

  1. Is it better to embed some code or insert the gif as you describe above for site speed? Or does it not really impact anything?

    • As long as the gif is optimized then there shouldn’t be a major impact having the gif uploaded on your site instead of embedding it.

      Admin

  2. This was a very helpful blogpost.

    I’ve been uploading gifs to giphy, but they became blurry in my page.

    However I now have high quality gifs.

    • You may want to ensure you don’t have an image optimization plugin that is attempting to modify the GIF

      Admin

    • While we don’t have a recommended method at the moment, we will certainly take a look for a possible addition to this article

      Admin

  3. Hi,

    I’ve added a animated gif on my WordPress site following your example. It worked but now the .gif has completely disappeared, even from my Media Library.

    Any idea where this could be coming from?
    Many thanks

  4. Hi, in my case, the media uploader does not offer the option to change the size of the file. Is that because I’m using the free version of WordPress? If so, which version must I purchase to be able to modify the size of the file and have a functioning GIF animation?

    Thanks!
    Chris

  5. I have an auto blog site in which I use to post to my social networks. I do not write posts I only upload images and use Auto Image Post and Draft Scheduler plugins to automate them.

    Admin please how do I make all my uploaded gif animate automatically?
    I have tried several plugins but none worked. i will greatly apreciate your help.

    Thanks.

  6. Great article and GREAT Timing! Just looked at and downloaded an animated gif I need to put on a wp site. Thanks so much for this information, wpbeginner.com!

  7. To my knowledge I’ve always heard that adding a GIF will slow down my blog. This is why I haven’t used it as yet. However I do have some niche sites that it just may not be a problem.
    Thanks for clarifying it.

    -Donna

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.