Categories: Magento 2 Tutorials

How to Add Magento 2 Product Video

The product page is the most important part of any ecommerce store as it will convince customers to buy. There are many tactics which you have to implement to help make your product page more appealing. The purpose behind it is to satisfy customers by providing them with a more detailed product description. Videos on a product page is a great way to share details and making the product page more attractive. Not only that, you can also use your product video for promotional activities. Magento 2 is one of the most popular ecommerce platform which has a large number of useful features which help you manage your store according to your requirements and that’s why it is an automatic choice for merchants. You can easily add Magento 2 product videos which can help inform your customers about your products in a better way.
This topic is a part of Product Management Series in Magento 2. You can jump on to the other parts here:
So today in this Magento 2 tutorial, I am going to teach you how to add Magento 2 product videos.

Generate a YouTube API Key

In order to add Youtube videos to products, you need to generate a Youtube API key. First, login into your Google account and go to Google Developers Console. You’ll be greeted with the following screen: Click the menu button on the left corner of the page, navigate to APIs & Services → Library: Select API Manager: Now you should be on the API library page. Scroll down and click on Youtube Data API. Now you will be redirected to YouTube Data API page, click on ENABLE: To enable it, create a project first: Here, enter your project name and click on CREATE: Now you will be redirected again to the YouTube Data API page, enable API. Now click on CREATE CREDENTIALS: Here first select YouTube Data API and Web browser (Javascript) and then click on What credentials do I need: You have finally generated an API key as demonstrated in the image below:

Integration of Youtube API key to Magento 2

Go to the Admin Panel of your Magento Store and navigate to the STORES tab from the left corner of the page. Select Configuration from the options. Now click on Catalog under CATALOG: Go to Product Video section and insert the Youtube API key which you generated in Google Developers Console. Then click on Save Config.

Integrate Magento 2 Product Video

Go to the Admin Panel of the Magento 2 Store and navigate to the CATALOG  tab. Next, click the Products option. Click on the Edit option of product. Now go to the Images and Videos section of Product and click on Add Video. Enter the Product video URL from Youtube and click on Save. Now, just click on Save as shown in the image below: Go back to the Product page and you will see the result. The above result means that you have successfully integrated a Magento 2 product video.

Final Words

You can use the video feature to attract and convince customers about the product. By following this tutorial, you’ll be able to add Magento 2 product videos easily. If you have a problem or would like to add more to the discussion, just leave a comment below.

Frequently Asked Questions

Q1. What is a Youtube API? It is an API (Application Programming Interface) used by YouTube through which developers can access YouTube Data from different channels and can get video statistics. With the help of it, you can add several YouTube features to your application. Q2. Is Youtube API key free to generate? Yes, you can generate a YouTube API key without any cost for almost any application. Q3. Can integration of Youtube video on Magento 2 website increase the load time of my website? Yes, it can affect the loading time of your website as you’re calling in data to your application from YouTube. But still, it will have minimal effects on your website as compared to having a video embedded into your website.
Syed Muneeb Ul Hasan

Syed Muneeb Ul Hasan is an expert in PHP and Magento, he prefers to educate users in implementing and learning Magento. When not working, he loves to watch cricket.

View Comments

    • Hello,

      Thanks for your appreciation. I have checked the URL that you provided and the video is playing.

      • Hi Syed,

        Yes, in the text but that's through a iframe include in the text. The video in the product picture set isn't playing right? Somehow it also shows 2 pictures of the same (still of the) video.

        Thanks.

        Regards, Bob.

          • Good day Syed,

            Did it step by step but still doesn't work unfortunately... By the way, after having created a project 'video' the project was not directly shown top left like in your picture (clickable pictures to be able to better see them would be nice by the way). Had to search for it and select. Only thing done differently from your manual is having created credentials BEFORE enabling the API. Might that be the reason it doesn't work? I have also attached the video to a different product but same problem (not playing, just showing a still).

            Thanks.

            Regards, Bob

          • Yes, it might be the reason. First enable the API then create credentials as shown in this tutorial

  • Hi Syed,

    Do you know how to set the video data (urls, name, title, description, etc..) for product via csv files import process?

Share
Published by
Syed Muneeb Ul Hasan

Recent Posts

Building Employee Trust and Dedication – A Complete Guide

In the highly competitive modern workplace, trust, and employee loyalty are crucial factors for long-term… Read More

3 months ago

12 Winning Strategies for Small Businesses Marketing

In the ever-evolving world of small business developing and implementing effective marketing strategies is critical to… Read More

3 months ago

Top 10 App Development Companies in Dubai 2024

With one of the highest internet penetration rates, the UAE has set out to revolutionize… Read More

3 months ago

Transforming Industries: How Amazons GPT44X is Revolutionizing AI Technology

Artificial Intelligence (AI) has been continually evolving, leading to remarkable advancements in various industries. Among… Read More

8 months ago

Top Magento 2 Extensions for 2023

Extensions, extensions and lots of extensions. We all love extensions, don’t we? After all, extensions… Read More

11 months ago

Unleashing the Power of Software Testing: Cooperating with a Testing Firm

Software quality is crucial to a firm's success across industries in the quickly changing digital… Read More

11 months ago