WebDevStudios / Automatic-Featured-Images-from-Videos

If a YouTube or Vimeo video exists in the first few paragraphs of a post, automatically set the post's featured image to that vidoe's thumbnail.
33 stars 24 forks source link

Test for and amend vimeo thumbnail fetching for larger size #61

Closed tw2113 closed 3 years ago

tw2113 commented 5 years ago

Right now we rely on what the .php/.json endpoint returns in its data. Specifically we fetch and use

"thumbnail_large": "https:\/\/i.vimeocdn.com\/video\/XYZXYZ_640.jpg"

and it has that _640 in the url.

A forum user pointed out there is a larger size when visiting https://i.vimeocdn.com/video/XYZXYZ.jpg

So, let's amend the plugin to attempt to fetch that large version, and fall back to what we normally fetch anyway, in the event one does not exist.

tw2113 commented 3 years ago

Handled in 2d4b226