I can't upload a video file through WYSIWYG editor. Sometimes it says File validation failed.. Sometimes it simply doesn't do anything while uploading a file.

Kindly help me.

  • Hi What video file? mp4? avi?
    – BartZalas
    Jul 5, 2018 at 13:21
  • both video file Jul 5, 2018 at 14:03
  • on witch one you had error? because avi is supported , mp4 no and you need add functionality for second one
    – BartZalas
    Jul 5, 2018 at 14:15
  • Can you try to upload first avi file from this site engr.colostate.edu/me/facil/dynamics/avis.htm and tell me is it working. In magento upload choice html5
    – BartZalas
    Jul 5, 2018 at 14:58

2 Answers 2


You can add mp4 for example that way:

Copy vendor/magento/module-cms/etc/di.xml to yourvendor/YourTheme/Magento_Cms/etc/di.xml

and add this to media_allowed

            <item name="mp4" xsi:type="number">1</item>

If you're looking to upload product video then there is one more method do it via YouTube. These are the steps which you have to follow:

  • Upload your video to YouTube.
  • Go to google developer console and generate YouTube Data API.
  • Then add the generated Youtube API key to your Magento 2 store by going to STORES --> Configuration.
  • At last, just add Video URL (YouTube) to your product edit page.

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.