Add youtube video media gallery magento 1

This tutorial explains how to add youtube video media gallery magento 1. The client want to embed youtube video with media gallery as shown below make the following amends in code.

Add youtube video media gallery magento 1

Step by step explanation

  • Add videoid attribute
  • Retrieve video id
  • Embed youtube video
  • Display youtube thumbnail image

Add videoid attribute

Add custom video id attribute from magento backend or custom attribute programmatically.


Retrieve video id

Make the following changes to the media.phtml file inside theme folder.(app\design\frontend\your_theme_folder\default\template\catalog\product\view)


Add youtube video media gallery magento 1

Enter the embed video code and add the video id as shown below.


Display youtube thumbnail image


Please click here refer how to import product images and other magento tutorials.

Share this Tutorial

Leave a Reply

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