WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.36k stars 4.14k forks source link

Can not put a GIF in an article #16238

Closed ValentinGratz closed 5 years ago

ValentinGratz commented 5 years ago

Describe the bug I can not insert a GIF in the publisher Gutenberg, for writing an article.

When I put the HTML code of the server (hosted), the code does not work. I tried to download the gif and host it via WordPress media, out, WordPress, deny for a security problem.

Reproduce Steps to reproduce the problem:

  1. Go to the GIF website (https://imgur.com/p9UGtCC), copy the embed code. or enregister the gif
  2. The paste in HTML format in the Gutenberg editor or the recorder and transfer via Media.
  3. For the HTML code, nothing happens, or the full integration code the GIF in very small.

Predictable behavior Gutenberg / WordPress Media refuse to support the kind of file.

Screenshot If so, add screenshots to explain your problem.

Code HTML for article : format HTML script ne fonctionne pas

Insert to Media gif non supporté

Office (please fill in the following information):

swissspidy commented 5 years ago

If you copy the HTML embed code, you would need to insert it in an HTML block, not a paragraph block. Can you confirm that you tried this?

ValentinGratz commented 5 years ago

Yes, I confirm that I have HTML formatted. And not in text format. And I did not make any changes in the code provided.

The capture displays the rendering on the published article. And when I just want to put the GIF in a big way, without the layout proposed by the host of GIF, and WP can not record the GIF in the media.

youknowriad commented 5 years ago

I just tried the embed code above and it worked as expected for me. Also note that if you're not an Admin in your website, WordPress might strip out some HTML attributes for security reasons causing errors on the frontend.