Retrieve the higher resolution thumbnail for older Vimeo's videos

Created on 5 November 2022, over 2 years ago
Updated 14 November 2024, 6 months ago

Problem/Motivation

Some older video display a 640px thumbnail trough oEmbed, for example : https://vimeo.com/api/oembed.json?url=https://vimeo.com/138459988

{
"type": "video",
"version": "1.0",
"provider_name": "Vimeo",
"provider_url": "https://vimeo.com/",
"title": "Navire océanographique \"Pourquoi Pas ?\" IFREMER",
"author_name": "John Wax",
"author_url": "https://vimeo.com/user10706613",
"is_plus": "0",
"account_type": "basic",
"html": "<iframe src=\"https://player.vimeo.com/video/138459988?h=9e6c1843d5&amp;app_id=122963\" width=\"640\" height=\"360\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture\" allowfullscreen title=\"Navire oc&amp;eacute;anographique &amp;quot;Pourquoi Pas ?&amp;quot; IFREMER\"></iframe>",
"width": 640,
"height": 360,
"duration": 127,
"description": "Vidéo aérienne du navire océanographique le \"Pourquoi pas ?\"",
"thumbnail_url": "https://i.vimeocdn.com/video/533820316-38121b8199d21657e7cb95494614e530b185034fe7dfbb6ce11fd274d2041008-d_640",
"thumbnail_width": 640,
"thumbnail_height": 360,
"thumbnail_url_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F533820316-38121b8199d21657e7cb95494614e530b185034fe7dfbb6ce11fd274d2041008-d_640&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png",
"upload_date": "2015-09-06 14:22:03",
"video_id": 138459988,
"uri": "/videos/138459988"
}

Note the thumbnail URL ending by d_640

In this case the smaller thumbnail will be retrieved.

Proposed resolution

Detect if the thumbnail is 640px and upgrade it.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇫🇷France tostinni

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024