was successfully added to your cart.

How to upload Youtube Videos as Product Videos in Magento 2?

uploading youtube videos to product images in magento

To upload Youtube videos as product videos in Magento 2, you need to follow three steps:

    • Step 1: Get your Youtube API key
    • Step 2: Configure Magento to use the Youtube API
    • Step 3: Link the video to product

 

 

Step 1: Get your YouTube API Key

Log in to your Google account, and visit the Google Developers Console. Then, follow these:

    • Click on YouTube Data APIYoutube-Data-API-1024x576

     

    • Enable the API and Click on Credentials on left and choose API KeyChoose-API-key-from-credentials-1024x576   After creation of API Key, copy it.

 

Step 2: Configure Magento 2

  • Open Admin Panel and go to Stores->Setting->Configuration
  • In the panel, under Catalog, choose Catalog
  • Expand the Product Video section, paste Youtube API key into the required field.Add-Youtube-API-key-to-Product-Video-1024x576
  • Click Save Config
  • Go to the terminal where your Magento directory is present, and run:

    php bin/magento indexer:reindex

  • Go to Cache Management and Refresh Cache

 

Step 3: Linking Video

    • Go in Product->Catalog->Select the product
    • In product page, navigate to Add Images and VideosAdd-product-video-1024x576

 

    • Click on Add VideoFill-in-details-to-Add-Product-Video-1024x576

     

    • Fill the information and Click on Save, and your video will get add to that product pageSave-to-show-preview-1024x576

 

On Success:

Products-Images-and-Videos-1024x576

 

*Note: You should ENABLE API before using it, API is enabled by creating new project and then clicking ENABLE