Magento 2 Developement

How to Add Product Video in Magento 2

Nowadays it’s hard to imaging a good product details page without a video. Watching these videos makes a truly overview of your products before purchasing that will bring even more sales by your clients. Luckily, there is built-in functionality to add product video in magento 2. It’s possible to achieve this in 3 simple steps: get an API Key from your Google account, enter it in the configuration of your store and finally link the product the video.

  1. Get Your YouTube API Key
  2. Configure Magento
  3. Link to the Video

1. Get Your YouTube API Key

The first step will be to login in to your Google account and navigate to Google Developers Console.

  • In the search field type “YouTube Data API v3” or find this block by scrolling down the page.
  • Click this block and then Enable the API.
  • After that you will be redirected to a Manage APIs page where you should apply your credentials.
  • In the panel on the left choose Credentials, expand the “Add Credentials” menu and choose API key.
  • When prompted to create a new key, choose Server key, enter a name for it and click the Create button.
  • After a while a new key will be generated and once it’s done copy this key to the clipboard.

2. Configure Magento

The next step is to apply the API key in Magento settings.

  • Login to Magento admin panel and navigate to Stores -> Configuration (1) section.



  • Under the Catalog -> Catalog -> Product Video (2) block paste your YouTube API Key (3) saved before.





  • Click the “Save Config” button.

The final step is to link our products to the necessary YouTube videos.

  • Open to edit your product.
  • Scroll down to the Images and Videos (1) section and click the “Add Video” (2) button on the right.



  • Fill in all required fields marked with “*”. Here you can also retrieve the video meta data that is stored on the host server. Use the original data, or update it as needed.
  • Save the changes once you finish (3).



That’s all, you can now apply YouTube videos for your products. As for the Vimeo videos the process is much easier and all you need is to apply video URL as shown at the latest screenshot while managing a product without configuring any APIs.

2 thoughts on “How to Add Product Video in Magento 2

Leave a Reply

Your email address will not be published. Required fields are marked *