In Cms Block, I'm trying to add an embed Youtube video that would autoplay upon the page is loaded. However, the part that defines autoplay "?autoplay=1&loop=999999999999&playlist=_bkTXNozzzQ" in the url is trimmed off after saving the block. Is there any way I can make it happen? enter image description here

2 Answers 2


If you want to add in cms block try below example:

<iframe width="420" height="315" src="http://www.youtube.com/embed/
oHg5SJYRHA0?autoplay=1" frameborder="0"
  • I see that when I save the block, the html code is rendered by magento and saved in database. So where can I put those code to make it work? Commented Dec 30, 2019 at 6:59
  • On the CMS page in the admin, click the Show/Hide Editor button and paste the HTML there. The standard WYSIWYG will not render HTML. First embed the required URL (embed.ly works). Then, copy paste into the CMS page Html render using WYSIWYG. Or, use the show/hide editor option and paste the HTML. Commented Dec 30, 2019 at 7:22
  • Thank you. I added Elements > HTML code instead of Media > Video and it works. Commented Dec 31, 2019 at 2:15

Go to Stores->Configuration->Catalog->Product Video (where you entered the youtube API key). There should be a field called Autostart base video. Set that to Yes after cache clean and check.

  • Does it work whether this block is placed on the homepage? That's no product related. Commented Dec 30, 2019 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.