WooCommerce does not support video in the product gallery out of the box: the default gallery shows images only. To add video to a WooCommerce product page you have three practical options: a gallery plugin, custom code in your theme, or a page builder. They differ in where the video appears, how much work they take and how easy they are to maintain.
This guide compares the three methods, then walks through each one so you can pick the right approach for your store.
The 3 Methods at a Glance
Method | Where the video appears | Skill needed | Cost | Best for |
|---|---|---|---|---|
1. Gallery plugin | Inside the product gallery, next to the images | Beginner | Free plan available | Most stores |
2. Custom code | Wherever your template places it, usually outside the gallery | Developer | Free (developer time) | Custom themes, full control |
3. Page builder | A video block in your product layout | Comfortable with the builder | Needs the builder (and often its paid plan) | Stores already built with Elementor or Divi |
The main difference is placement. Shoppers look at the gallery first, and only a gallery plugin puts the video there without custom development.
Method 1: Add Video With a Gallery Plugin
A gallery plugin adds video files to the native WooCommerce product gallery, so the video shows up as a slide next to the product images. You do not touch code, and you manage videos from the product edit screen.
We use our own plugin, Video Gallery for WooCommerce, in this example. It has 4,000+ active installations and a 5/5 rating on WordPress.org. Other gallery plugins work in a similar way - see our comparison of the best WooCommerce product video plugins.
Step 1: Install the plugin
In your WordPress dashboard, go to Plugins → Add New
Search for "Video Gallery for WooCommerce"
Click Install Now, then Activate
Step 2: Set your defaults
Open the Video Gallery menu in the admin sidebar (right below WooCommerce) and go to Settings. Set the video icon and its color, and the default playback options: autoplay, sound, loop and whether player controls are visible.
Step 3: Add a video to a product
Go to Products and click Edit on a product
Scroll down to the Product Data box and open the Video Gallery for WooCommerce tab
Add a video from your Media Library (MP4 or MOV)
Drag to set its position in the gallery, and pick a thumbnail frame if you want
Click Update
Free and PRO limits
Free: up to 2 videos per product, on up to 20 products, from the WordPress Media Library
PRO: up to 6 videos per product on unlimited products, YouTube and Vimeo by URL, per-video SEO fields, video analytics and sticky video on scroll
For every setting explained with screenshots, see the full Video Gallery for WooCommerce setup guide.
Method 2: Add Video With Custom Code
If you run a custom theme and have a developer, you can add a video field to products and output it with an HTML5 <video> element. You get full control, but the video sits wherever your template puts it, not inside the product gallery.
Step 1: Add a video URL field to products
Add this to your child theme's functions.php or a code snippets plugin. It adds a "Product video URL" field to the General tab of the product data box and saves it.
// Add a video URL field to the product data box
add_action( 'woocommerce_product_options_general_product_data', 'nmx_add_product_video_field' );
function nmx_add_product_video_field() {
woocommerce_wp_text_input( array(
'id' => '_product_video_url',
'label' => __( 'Product video URL', 'your-textdomain' ),
'placeholder' => 'https://example.com/wp-content/uploads/video.mp4',
'desc_tip' => true,
'description' => __( 'Full URL of an MP4 file.', 'your-textdomain' ),
) );
}
// Save the field
add_action( 'woocommerce_process_product_meta', 'nmx_save_product_video_field' );
function nmx_save_product_video_field( $post_id ) {
$url = isset( $_POST['_product_video_url'] ) ? esc_url_raw( wp_unslash( $_POST['_product_video_url'] ) ) : '';
update_post_meta( $post_id, '_product_video_url', $url );
}Step 2: Show the video on the product page
This prints the video below the product summary. Change the hook or priority to move it.
add_action( 'woocommerce_after_single_product_summary', 'nmx_show_product_video', 5 );
function nmx_show_product_video() {
$url = get_post_meta( get_the_ID(), '_product_video_url', true );
if ( empty( $url ) ) {
return;
}
$poster = get_the_post_thumbnail_url( get_the_ID(), 'large' );
?>
<div class="nmx-product-video">
<video controls playsinline preload="none" poster="<?php echo esc_url( $poster ); ?>">
<source src="<?php echo esc_url( $url ); ?>" type="video/mp4">
</video>
</div>
<?php
}Step 3: Make it responsive
.nmx-product-video { margin: 24px 0; }
.nmx-product-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }What you take on with custom code
The video is not part of the product gallery and its thumbnails
No structured data unless you add VideoObject markup yourself
Captions need a
<track>element and a .vtt fileTheme changes and updates are your responsibility
Method 3: Add Video With a Page Builder
If your product pages are already designed with a page builder, you can add the builder's video element to the product template.
Elementor
Elementor's Video widget plays YouTube, Vimeo and Dailymotion videos as well as self-hosted files. To use it on product pages, add it to your single product template (designing WooCommerce product templates is part of Elementor Pro's Theme Builder), then set the source and playback options.
Divi
In Divi, go to Divi → Theme Builder, create a template assigned to all products and design its body with the Woo modules. The Divi Video module accepts self-hosted MP4 and WebM files as well as YouTube and Vimeo URLs, and supports a custom overlay image.
Things to know about the page builder method
A video placed in a shared product template is the same on every product, unless you pull a per-product video URL from a custom field with the builder's dynamic content features
The video is a separate block, not a slide in the product gallery
Your product pages depend on the builder staying active
Before You Publish: WooCommerce Product Page Video Checklist
Whichever method you choose, check these before the video goes live:
Format: MP4 with H.264 is the safest choice for browser support
File size: trim dead seconds and compress, so the file is no larger than it needs to be
Poster image: set a lightweight still frame so something shows before playback
Preload: use
preload="none"orpreload="metadata"so the full file does not download on page loadAutoplay: only muted autoplay works reliably in browsers - use click-to-play for videos with sound
iPhone: add
playsinlineso the video plays inside the pageCaptions: add them to any video with speech
Speed: check Core Web Vitals after adding video. Google's "good" thresholds are LCP of 2.5 seconds or less, INP of 200 milliseconds or less and CLS of 0.1 or less
Mobile: test playback on a real iPhone and Android phone
For which videos to make and where they work best, see our article on video-first product pages. To find out whether your videos actually lift sales, follow our guide to product video analytics.
Which Method Should You Choose?
Gallery plugin if you want video inside the product gallery with no code. This fits most stores, and it is the easiest to manage across many products.
Custom code if you run a custom theme, have a developer, and want full control over the player and its placement.
Page builder if your product pages are already built with Elementor or Divi and a video block outside the gallery is fine for your layout.
FAQ
Can WooCommerce show product videos without a plugin?
Not in the product gallery. The default WooCommerce gallery shows images only. Without a plugin you can still add a video with custom code or a page builder, but it appears outside the gallery.
Can I use YouTube videos on WooCommerce product pages?
Yes. Page builders like Elementor and Divi accept YouTube URLs, and some gallery plugins support YouTube, sometimes only in a paid version. Video Gallery for WooCommerce supports YouTube and Vimeo in PRO.
How many videos can I add to one product?
It depends on the method. With Video Gallery for WooCommerce, the free version allows up to 2 videos per product and PRO allows up to 6. With custom code or a page builder, it depends on how you build the template.
Will adding video slow down my product pages?
Not if it is set up well. Use a poster image, avoid preloading the full file, compress the video and check Core Web Vitals after you add it.
Does product video help SEO?
It can help shoppers and conversions, but do not count on video results in Google. Google shows video features only for pages where the video is the main content, and a product page usually is not one. Our video-first product pages article explains what that means.


