WordPress

How to Add a Video to the WooCommerce Product Gallery (and the Right Image Sizes)

WooCommerce’s gallery takes images only. Three ways to add a product video, how to keep the page fast, and the image sizes a product gallery needs.

How to Add a Video to the WooCommerce Product Gallery (and the Right Image Sizes)
On this page 9 sections
  1. Three ways to add a product video
  2. How to add a video with a plugin
  3. How to add a video in XStore
  4. The free way: a video in the description
  5. YouTube, Vimeo or your own file?
  6. Keep the product page fast
  7. The right image sizes for a product gallery
  8. Common problems and fixes
  9. FAQ

WooCommerce’s product gallery takes images only: there is no field for a video. To add a video to the gallery you need a theme that supports product video or a product video plugin. The free alternative is to paste a YouTube or Vimeo link into the product description, where WordPress turns it into a player.

This guide covers the three ways to add a product video, how to keep the page fast with a video on it, and the image sizes a product gallery needs.

We build WooCommerce themes at 8theme, and XStore, our main theme, has product video built in. The product gallery comes up in about 740 of the 45,000+ topics in our support forum and image sizes in about 1,270 (counted in November 2026).

Three ways to add a product video

Way What you get Keep in mind
A theme with product video, such as XStore The video sits in the gallery next to the images No extra plugin
A product video plugin A video slide in the gallery on any theme One more plugin; check that it works with your gallery and zoom
A link in the description A player in the description or in a tab Free, but the video is not in the gallery

How to add a video with a plugin

Product Video Gallery for WooCommerce is a free example; the WooCommerce marketplace and YITH sell others. The steps are alike.

  1. Install the plugin from Plugins → Add New.
  2. Open a product. A new field for the video appears in the editor, usually near the product gallery.
  3. Paste the address of a YouTube or Vimeo video, or choose an MP4 file from the media library.
  4. Choose the position. First in the gallery gets the most views. Second keeps the main image as the first thing that loads.
  5. Check the page on a phone: the thumbnail, the play button, and what happens when the gallery is swiped.

How to add a video in XStore

XStore, the WooCommerce theme by 8theme, shows product videos in the gallery without a plugin. Add the video in the product’s settings and it appears among the gallery images. An option in the theme shows the video in place of the featured image.

The same video can play on shop and category pages; the XStore documentation has the code for that. For products that need to be seen from every side, XStore also includes a 360° product viewer.

The free way: a video in the description

Paste the address of a YouTube or Vimeo video on its own line in the product description or the short description. WordPress replaces it with a player. Nothing to install, and it works with every theme.

The video is then below the gallery, not in it, so fewer shoppers see it. It suits how-to and size-guide videos better than the main product video.

YouTube, Vimeo or your own file?

  • YouTube or Vimeo cost nothing to stream and adapt to the visitor’s connection. The price is their player: extra scripts, and with YouTube, suggested videos at the end.
  • Your own MP4 file looks clean and can loop silently like an animated image. Every view uses your hosting’s bandwidth, so keep the file short and small.

For a self-hosted product video: 10 to 30 seconds, MP4 with H.264, no sound track if it loops, and a file of a few megabytes at most.

Keep the product page fast

A video is the heaviest thing on a product page. Three rules keep it from slowing the page down.

  • Do not load the player until someone presses play. Show an image with a play button and load YouTube or Vimeo on click. Most video plugins and themes have this option.
  • Keep the main image first. The largest picture at the top of the page decides the loading score, and an image loads faster than a video.
  • No autoplay with sound. Browsers block it, and shoppers leave. A silent loop is fine.

Our WooCommerce speed guide covers the rest of the page.

WooCommerce makes three versions of every product image.

Image Where it shows Where to set it
Main image The product page Appearance → Customize → WooCommerce → Product Images, 600 pixels wide by default
Thumbnail Shop and category pages The same screen, 300 pixels by default, with a choice of cropping
Gallery thumbnail The small pictures under the main image Set by the theme

Some themes set these sizes themselves. Then the fields in the Customizer are missing, and the sizes are in the theme options.

What to upload:

  • At least 800 by 800 pixels. For zoom, 1200 to 1600 pixels on the longer side.
  • The same proportions for every product, so the catalog grid stays even. Square is the safe choice.
  • A compressed file, ideally under 200 KB, in WebP or JPEG.
  • A plain, consistent background for the first image.

After changing the sizes, regenerate the thumbnails, or old products keep their old pictures. WooCommerce does it in the background; a plugin such as Regenerate Thumbnails does it at once.

Common problems and fixes

  • Images look blurry. The uploaded picture is smaller than the size the theme shows. Upload a larger one and regenerate the thumbnails.
  • Pictures in the catalog have different heights. The originals have different proportions. Choose 1:1 cropping for thumbnails under Product Images, or crop the originals.
  • The video does not show in the gallery. The theme draws its own gallery and the plugin does not know it. Use the theme’s video field if it has one, or a plugin that supports the theme.
  • The video plays behind the zoom or lightbox. Switch zoom off for the video slide, or use the plugin’s own lightbox.
  • The page became slow after adding a video. The player loads at once. Turn on the click-to-load option.
  • The new sizes do not apply. The thumbnails were not regenerated, or the cache still serves the old pictures.

For everything else on the page, see our product page design checklist.

FAQ

Not with WooCommerce alone: its gallery takes images only. A theme with product video, such as XStore, or a product video plugin adds a video slide to the gallery.

How do I add a YouTube video to a WooCommerce product?

Paste the video’s address on its own line in the product description and WordPress shows a player. To put the video inside the gallery, use the theme’s product video field or a product video plugin.

What is the best image size for WooCommerce products?

Upload square images of at least 800 by 800 pixels, or 1200 to 1600 pixels if you use zoom. WooCommerce makes the smaller versions itself.

Does a product video slow down the page?

It can. Load the player only on click, keep the main image first, and keep self-hosted files short. Then the effect is small.

Put it first when the video is the best way to show the product, and second when speed matters more. In both cases, the first frame or thumbnail should work as a product picture.

Does XStore support product videos?

Yes. XStore by 8theme has product video built in: the video is added in the product’s settings and shows in the gallery. The theme also includes a 360° product viewer.

Share

Written by

Rose Tyler

Rose writes practical WordPress and WooCommerce guides for the 8theme blog.

All 37 articles by Rose Tyler