I am trying to add Vimeo video on Magento's product details page, so initially while adding video from admin I was getting error as "Video not found" so I applied the solution given at:


Then still my video was not displaying on front end so I applied the solution from here:


Now when I checked it loads the video thumbnail with Play icon but clicking on play gives an error as per screenshot:

Vimeo Video Error

After more debugging I found that the URL generated for iframe to load video is something like this:


Which won't work, as it should be


If I use this url by changing iframe source manually on loaded page, it works fine, but I am not sure form where Magento is generating that embed url which is not working, tried searching load-player.js file in Magento_ProductVideo , tried searching fotoroma js files also, and other folder I could think of, but nothing helped.

  • awaiting expers comment Commented Jul 26, 2021 at 5:33
  • have you check the console, is there any error there? Commented Jul 27, 2021 at 4:11
  • the only error I see is that it cant load content from vimeo.com because of cross origin policy, but thats obvious as vimeo has stopped serving content on its primary url for video embedding and it only allows the same if called using url player.vimeo.com Commented Jul 27, 2021 at 6:39

1 Answer 1


I got to solve this by editing file:


by replacing this piece of code at approx line no. 1080:

function createVideoFrame(videoItem) {
        var frame = '<iframe src="' + videoItem.p + videoItem.type + '.com/embed/' + videoItem.id + '" frameborder="0" allowfullscreen></iframe>';
        return frame;

with this one:

function createVideoFrame(videoItem) {
        var frame = '';
        if(videoItem.type == 'vimeo'){
            frame = '<iframe src="https://player.vimeo.com/video/' + videoItem.id + '" frameborder="0" allowfullscreen></iframe>';  
        } else {
           frame = '<iframe src="' + videoItem.p + videoItem.type + '.com/embed/' + videoItem.id + '" frameborder="0" allowfullscreen></iframe>';
        return frame;

I know its a core hack but I am sure Magento's people will soon update the core as Vimeo has stopped video embedding on its primary domain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.