Neal & Associates

Match embedded Vimeo video to your default site width

Vimeo

So in my day job we use Vimeo for all our film projects, primarily because it enables you to credit those people involved in making a project happen and also because you can replace earlier copies of a video, which is particularly useful when you have to get approval from multiple project partners before a film is signed off. However, the advantages and disadvantages of vimeo as a video platform aside, embedding the resulting video in our site and those of our partners is an essential feature and obviously we’re running wordpress so this is made easy for us.

What the link above doesn’t tell you is that you don’t need to specify both the width and the height of your video (always a pain to work out) you just need to specify the width and the height will be automatically be generated:

(vimeo https://vimeo.com/127168308 w=960)
replacing the curly parenthesis ( ) with square ones [ ]

In Action

See it action in one of our videos, Giants in the Walls, produced for the One Planet Middlesbrough project:

[vimeo https://vimeo.com/127168308 w=560]

560 px wide – tiny!

[vimeo https://vimeo.com/127168308 w=760]

760 px wide – a bit too small

[vimeo https://vimeo.com/127168308 w=960]
960 px wide – just right!*

Jump to 3 minutes 58 seconds for my favourite part – thanks Andy Berriman, this makes me chuckle every time!

In the future hopefully this solution will also support the standard addition to a vimeo url of #t=3m58s allowing you to specify the start time, so you don’t have to rely on your readers to self select; although this is definitely a video worth watching in full!

* Find out the default size of your blog post by using the developer tool in chrome.

Exit mobile version