none
In SharePoint Online List View AllItems.aspx, for a Video column, how to show the video thumbnail as one of the columns? Videos are stored in YouTube which generates a thumbnail. RRS feed

  • Question

  • Hi there

    In SharePoint Online List View AllItems.aspx, for a Video column, how to show the video thumbnail as one of the columns?
    Videos are stored in YouTube which generates a thumbnail.

    Thanks.

    Wednesday, July 10, 2019 7:20 PM

Answers

  • Hi ran009,

    There is no OOB column to display video thumbnail in a column.  Here is a workaround, check if it’s feasible for you:

    1. Create a text column named as "Video URL" which type the link of video in it.

    2. Get the image link of video thumbnail via the link below:

    https://img.youtube.com/vi/ <insert-youtube-video-id-here>/0.jpg

    Reference: How do I get a YouTube video thumbnail from the YouTube API?

    3. Create a Picture column and  set the picture column Column Formatting with the JSON below:

    {
      "elmType": "a",
      "attributes": {
        "href": "[$Video_x0020_URL]",
        "target": "_blank"
      },
      "children": [
        {
          "elmType": "img",
          "style": {
            "width": "100px"
          },
          "attributes": {
            "src": "@currentField"
          }
        }
      ]
    }

    4. Then type the above link of thumbnail image in this column.

    5. You can hide the Video URL column in the list view.

    More information check the article:

    Use column formatting to customize SharePoint

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, July 11, 2019 8:24 AM
    Moderator

All replies

  • Hi ran009,

    There is no OOB column to display video thumbnail in a column.  Here is a workaround, check if it’s feasible for you:

    1. Create a text column named as "Video URL" which type the link of video in it.

    2. Get the image link of video thumbnail via the link below:

    https://img.youtube.com/vi/ <insert-youtube-video-id-here>/0.jpg

    Reference: How do I get a YouTube video thumbnail from the YouTube API?

    3. Create a Picture column and  set the picture column Column Formatting with the JSON below:

    {
      "elmType": "a",
      "attributes": {
        "href": "[$Video_x0020_URL]",
        "target": "_blank"
      },
      "children": [
        {
          "elmType": "img",
          "style": {
            "width": "100px"
          },
          "attributes": {
            "src": "@currentField"
          }
        }
      ]
    }

    4. Then type the above link of thumbnail image in this column.

    5. You can hide the Video URL column in the list view.

    More information check the article:

    Use column formatting to customize SharePoint

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, July 11, 2019 8:24 AM
    Moderator
  • Hi ran009,

    Is there any update?

    If the post helps you, you can mark it as answer to help other community members to find the information quickly.

    Thanks for your understanding.

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, July 24, 2019 9:14 AM
    Moderator