{"id":27904,"date":"2022-03-24T19:58:17","date_gmt":"2022-03-24T19:58:17","guid":{"rendered":"http:\/\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs"},"modified":"2025-03-02T13:10:34","modified_gmt":"2025-03-02T21:10:34","slug":"create-video-thumbnail-with-preview-on-hover-in-nuxtjs","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/","title":{"rendered":"Video thumbnail with preview on hover in Nuxtjs"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p>Popular video streaming platforms like Netflix, Hulu, Youtube, e.t.c; give users an option to watch previews of listed videos while hovering. This feature helps users save time by watching preliminaries and quickly determining if it is relevant to them before watching it.<\/p>\n<p>This post will discuss creating video thumbnail previews on hover using <a href=\"https:\/\/cloudinary.com\/\">Cloudinary<\/a> and <a href=\"https:\/\/nuxtjs.org\/\">Nuxt.js<\/a>. At the end of this tutorial, we will learn how to use Cloudinary\u2019s AI-Based video preview feature to generate video previews that improve users\u2019 experience while browsing through videos.<\/p>\n<h2>Sandbox<\/h2>\n<p>We completed this project in <a href=\"https:\/\/codesandbox.io\/s\/awesome-borg-pr6pli\">a CodeSan<\/a><a href=\"https:\/\/codesandbox.io\/s\/awesome-borg-pr6pli\">d<\/a><a href=\"https:\/\/codesandbox.io\/s\/awesome-borg-pr6pli\">box<\/a>, and you can fork it to run the code.<\/p>\n<\/div>\n  \n  <div class=\"wp-block-cloudinary-code-sandbox \">\n    <iframe\n      src=\"https:\/\/codesandbox.io\/embed\/awesome-borg-pr6pli?theme=dark&amp;codemirror=1&amp;highlights=&amp;editorsize=50&amp;fontsize=14&amp;expanddevtools=0&amp;hidedevtools=0&amp;eslint=0&amp;forcerefresh=0&amp;hidenavigation=0&amp;initialpath=%2F&amp;module=&amp;moduleview=0&amp;previewwindow=&amp;view=&amp;runonclick=1\"\n      height=\"500\"\n      style=\"width: 100%;\"\n      title=\"create-video-thumbnail-with-preview-on-hover-in-nuxtjs\"\n      loading=\"lazy\"\n      allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n      sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n    ><\/iframe>\n  <\/div>\n\n  <div class=\"wp-block-cloudinary-markdown \"><p>Github link <a href=\"https:\/\/github.com\/Mr-Malomz\/video_thumbnail\">here<\/a>.<\/p>\n<h2>Prerequisites<\/h2>\n<p>The following steps in this post require JavaScript and Vue.js experience. Experience with Nuxt.js isn\u2019t a requirement, but it\u2019s nice to have.<\/p>\n<p>We also need a <a href=\"https:\/\/cloudinary.com\/\">Cloudinary account<\/a> to store and transform media assets. <a href=\"https:\/\/cloudinary.com\/users\/register\/free\"><strong>Signup<\/strong><\/a> <strong>is completely free<\/strong>.<\/p>\n<h2>Getting Started<\/h2>\n<p>We need to create a Nuxt.js starter project by navigating to the desired directory and running the command below in our terminal.<\/p>\n<pre><code>npx create-nuxt-app video_thumbnail &amp;&amp; cd video_thumbnail\n<\/code><\/pre>\n<p>This command will ask us some questions on how to configure our application. We can answer the questions as shown below:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\">    Ok to proceed? (y) &lt; PRESS <span class=\"hljs-string\">\"y\"<\/span> <span class=\"hljs-keyword\">and<\/span> hit ENTER&gt;\n    project name: &lt;PRESS ENTER&gt;\n    programming langauge: &lt;JAVASCRIPT&gt;\n    package manager: &lt;NPM&gt;\n    UI framework: &lt;TAILWIND CSS&gt;\n    Nuxt.js modules: &lt;AXIOS - PROMISE BASED HTTP CLIENT&gt;\n    Linting tools: &lt;ESLINT, PRETTIER&gt;\n    Testing framework: &lt;NONE&gt;\n    Rendering mode: &lt;UNIVERSAL (SSR\/<span class=\"hljs-keyword\">STATIC<\/span>)\n    Deployment target: &lt;<span class=\"hljs-keyword\">STATIC<\/span>\/JAMSTACK HOSTING&gt;\n    Deployment tools: &lt;JSCONFIG.JSON&gt;\n    Continous integration: &lt;NONE&gt;\n    Version control system: &lt;GIT&gt;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The command creates a Nuxt.js project with TailwindCSS called <code>video_thumbnail<\/code>, and navigates into the project directory.<\/p>\n<p><a href=\"https:\/\/tailwindcss.com\/\">TailwindCSS<\/a> is a utility-first CSS framework packed with classes to help us style our web page.<\/p>\n<h3>Configuring Cloudinary in Nuxt.js<\/h3>\n<p>First, we need to modify the <code>nuxt.config.js<\/code> file by adding Cloudinary CDNs to the <code>link<\/code>  and <code>script<\/code> section as shown below:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">    head: {\n        ...\n        htmlAttrs: {\n         ...\n        },\n        <span class=\"hljs-attr\">meta<\/span>: &#91;\n          ...\n        ],\n        <span class=\"hljs-attr\">link<\/span>: &#91;\n          { <span class=\"hljs-attr\">rel<\/span>: <span class=\"hljs-string\">'icon'<\/span>, <span class=\"hljs-attr\">type<\/span>: <span class=\"hljs-string\">'image\/x-icon'<\/span>, <span class=\"hljs-attr\">href<\/span>: <span class=\"hljs-string\">'\/favicon.ico'<\/span> },\n          {\n            <span class=\"hljs-attr\">rel<\/span>: <span class=\"hljs-string\">'stylesheet'<\/span>,\n            <span class=\"hljs-attr\">href<\/span>: <span class=\"hljs-string\">'https:\/\/unpkg.com\/cloudinary-video-player@1.5.9\/dist\/cld-video-player.min.css'<\/span>,\n          },\n        ],\n        <span class=\"hljs-attr\">script<\/span>: &#91;\n          {\n            <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">'https:\/\/unpkg.com\/cloudinary-core@latest\/cloudinary-core-shrinkwrap.min.js'<\/span>,\n          },\n          {\n            <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">'https:\/\/unpkg.com\/cloudinary-video-player@1.5.9\/dist\/cld-video-player.min.js'<\/span>,\n          },\n        ],\n      },\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Next, we need to include our Cloudinary\u2019s cloud name as an environment variable. To do this, first, we need to create a <code>.env<\/code> file in the root directory, and in this file, add the snippet below:<\/p>\n<pre><code>NUXT_ENV_CLOUDINARY_CLOUD_NAME=&lt;YOUR CLOUD NAME HERE&gt;\n<\/code><\/pre>\n<p><strong>PS<\/strong>: <em>We can get<\/em> <strong>Cloudinary\u2019s cloud name<\/strong> by logging into the <a href=\"https:\/\/cloudinary.com\/console\"><em>Cloudinary console<\/em><\/a><em>.<\/em><\/p>\n<h2>Video sourcing and upload to Cloudinary<\/h2>\n<p>Next, we need to upload sample videos to generate thumbnails and previews.\n<strong>Video URLs<\/strong><\/p>\n<ul>\n<li>\n<a href=\"https:\/\/res.cloudinary.com\/dtgbzmpca\/video\/upload\/v1635669808\/jkffravgmvsumnnv8qs0.mp4\">https:\/\/res.cloudinary.com\/dtgbzmpca\/video\/upload\/v1635669808\/jkffravgmvsumnnv8qs0.mp4<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/res.cloudinary.com\/dtgbzmpca\/video\/upload\/v1635528649\/h77edtixvdz0ddkvspsy.mp4\">https:\/\/res.cloudinary.com\/dtgbzmpca\/video\/upload\/v1635528649\/h77edtixvdz0ddkvspsy.mp4<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/res.cloudinary.com\/dtgbzmpca\/video\/upload\/v1645539487\/dancing-catvideo.webm\">https:\/\/res.cloudinary.com\/dtgbzmpca\/video\/upload\/v1645539487\/dancing-catvideo.webm<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/res.cloudinary.com\/dtgbzmpca\/video\/upload\/v1621302254\/ouszrok1zgkeuqqsuzit.mkv\">https:\/\/res.cloudinary.com\/dtgbzmpca\/video\/upload\/v1621302254\/ouszrok1zgkeuqqsuzit.mkv<\/a>\n<\/li>\n<\/ul>\n<p>In our Cloudinary dashboard, we uploaded the videos by clicking on the <strong>Media Library<\/strong> tab, clicking on <strong>Upload<\/strong>, selecting <strong>Web Address<\/strong> option, input the <strong>url<\/strong>, and clicking on the <strong>Arrow Button<\/strong> to upload.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_09154C99BD025007588E7E863D13AB13FE936D0B55FA69EF06F32C362371F6D6_1635104341304_Screenshot+2021-10-24+at+20.37.46.png\" alt=\"Cloudinary console and upload button for other formats of upload\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"275\"\/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_83F3FBD7ECC4D58C256BC95B11E26148AE441C8ED8A1FF0E7E7D0A2229B1C1FD_1642503859751_Screenshot+2022-01-16+at+22.15.17.png\" alt=\"select web address and enter url\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"958\"\/><\/p>\n<p>After uploading all the videos, we will see them displayed on the console with their <code>publicId<\/code>. The <strong>ID<\/strong>s will come in handy when creating video thumbnails and previews.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_591FD6E74F721203ADBB06626E80032991173FA72FA190B8120E0E3557A4C401_1645661365030_Screenshot+2022-02-24+at+01.03.04.png\" alt=\"Uploaded video with publicId highlighted\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"939\"\/><\/p>\n<h2>Setup collection for our videos<\/h2>\n<p>Next, we need to create a <code>utils<\/code> folder in the project root directory. In this folder, we create a <code>videoList.json<\/code> file to save data about the uploaded videos.<\/p>\n<p>Here is the JSON data for the file.<\/p>\n<pre><code>[\n    {\n        &quot;id&quot;: 1,\n        &quot;publicId&quot;: &quot;&lt;REPLACE THIS WITH YOUR IMAGE PUBLICID&gt;&quot;\n    },\n    {\n        &quot;id&quot;: 2,\n        &quot;publicId&quot;: &quot;&lt;REPLACE THIS WITH YOUR IMAGE PUBLICID&gt;&quot;\n    },\n    {\n        &quot;id&quot;: 3,\n        &quot;publicId&quot;: &quot;&lt;REPLACE THIS WITH YOUR IMAGE PUBLICID&gt;&quot;\n    },\n    {\n        &quot;id&quot;: 4,\n        &quot;publicId&quot;: &quot;&lt;REPLACE THIS WITH YOUR IMAGE PUBLICID&gt;&quot;\n    }\n]\n<\/code><\/pre>\n<h2>Creating the Video Previews<\/h2>\n<p>Next, we modify the <code>index.vue<\/code> file in the <code>pages<\/code>  folder to the following:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"flex flex-col items-center p-8\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h1<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"text-xl font-medium text-blue-900 mb-8\"<\/span>&gt;<\/span>Cloudinary Video Preview<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h1<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"grid grid-cols-1 lg:grid-cols-3 gap-3\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>\n            <span class=\"hljs-attr\">class<\/span>\n            <span class=\"hljs-attr\">v-for<\/span>=<span class=\"hljs-string\">\"(video, i) in videoList\"<\/span>\n            <span class=\"hljs-attr\">:key<\/span>=<span class=\"hljs-string\">\"i\"<\/span>\n            @<span class=\"hljs-attr\">mouseenter<\/span>=<span class=\"hljs-string\">\"onHoverEnter(i)\"<\/span>\n            @<span class=\"hljs-attr\">mouseleave<\/span>=<span class=\"hljs-string\">\"onHoverLeave(i)\"<\/span>\n          &gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">video<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"w-96 h-96\"<\/span> <span class=\"hljs-attr\">:id<\/span>=<span class=\"hljs-string\">\"`video-player${video.id}`\"<\/span> <span class=\"hljs-attr\">muted<\/span> <span class=\"hljs-attr\">controls<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">video<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span>&gt;<\/span><span class=\"javascript\">\n    <span class=\"hljs-keyword\">import<\/span> videoList <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'@\/utils\/videoList.json'<\/span>\n    \n    <span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> {\n      <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">'IndexPage'<\/span>,\n      data() {\n        <span class=\"hljs-keyword\">return<\/span> {\n          <span class=\"hljs-attr\">cld<\/span>: <span class=\"hljs-literal\">null<\/span>,\n          <span class=\"hljs-attr\">player<\/span>: <span class=\"hljs-literal\">null<\/span>,\n          videoList,\n        }\n      },\n    \n      mounted() {\n        <span class=\"hljs-keyword\">this<\/span>.player = <span class=\"hljs-keyword\">this<\/span>.videoList;\n        <span class=\"hljs-keyword\">this<\/span>.cld = cloudinary.Cloudinary.new({\n          <span class=\"hljs-attr\">cloud_name<\/span>: process.env.NUXT_ENV_CLOUDINARY_CLOUD_NAME,\n          <span class=\"hljs-attr\">secure<\/span>: <span class=\"hljs-literal\">true<\/span>,\n        })\n        <span class=\"hljs-keyword\">this<\/span>.videoList.forEach(<span class=\"hljs-function\">(<span class=\"hljs-params\">video, i<\/span>) =&gt;<\/span> {\n          <span class=\"hljs-keyword\">this<\/span>.player&#91;i] = <span class=\"hljs-keyword\">this<\/span>.cld.videoPlayer(<span class=\"hljs-string\">`video-player<span class=\"hljs-subst\">${video.id}<\/span>`<\/span>, {\n            <span class=\"hljs-attr\">transformation<\/span>: { <span class=\"hljs-attr\">effect<\/span>: <span class=\"hljs-string\">\"preview:duration_5\"<\/span> }\n          })\n          <span class=\"hljs-keyword\">this<\/span>.player&#91;i].source(<span class=\"hljs-string\">`<span class=\"hljs-subst\">${video.publicId}<\/span>.jpg`<\/span>)\n        });\n      },\n    \n      <span class=\"hljs-attr\">methods<\/span>: {\n        onHoverEnter(id) {\n          <span class=\"hljs-keyword\">this<\/span>.player&#91;id].source(<span class=\"hljs-keyword\">this<\/span>.videoList&#91;id].publicId)\n          <span class=\"hljs-keyword\">this<\/span>.player&#91;id].play()\n        },\n        onHoverLeave(id) {\n          <span class=\"hljs-keyword\">this<\/span>.player&#91;id].source(<span class=\"hljs-keyword\">this<\/span>.videoList&#91;id].publicId)\n          <span class=\"hljs-keyword\">this<\/span>.player&#91;id].stop()\n        },\n      },\n    }\n    <\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The snippet above does the following:<\/p>\n<ul>\n<li>Import the video collection.<\/li>\n<li>Create <code>data<\/code> properties to manage imported video collection, Cloudinary instance, and video element.<\/li>\n<li>Use the <code>mounted<\/code> lifecycle method to assign the list of imported videos to the <code>player<\/code> variable, create a Cloudinary instance, loop through the list of videos to initialize the video player and assign a source to the video using the <code>publicId<\/code>.\nWe also leverage Cloudinary\u2019s support for AI-Based transformation to apply the <code>preview<\/code> transformation effect with a duration of 5 seconds.<\/li>\n<li>Create an <code>onHoverEnter<\/code> and <code>onHoverLeave<\/code> method to assign, play and stop a video while hovering.<\/li>\n<li>Markup while hovering to show the list of videos with corresponding functions to play and pause a video.<\/li>\n<\/ul>\n<p>With that done, we can start a development server using the command below:<\/p>\n<pre><code>npm run dev\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_591FD6E74F721203ADBB06626E80032991173FA72FA190B8120E0E3557A4C401_1645667788473_screencapture-localhost-3000-2022-02-24-02_55_57.png\" alt=\"working demo\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"1256\"\/><\/p>\n<h1>Conclusion<\/h1>\n<p>This post discussed creating a video thumbnail with a preview on hover using Cloudinary and Nuxt.js.<\/p>\n<p>These resources might be helpful:<\/p>\n<ul>\n<li>\n<a href=\"https:\/\/tailwindcss.com\/\">TailwindCSS<\/a>.<\/li>\n<li>\n<a href=\"https:\/\/cloudinary.com\/documentation\/video_effects_and_enhancements#ai_based_video_preview\">Cloudinary AI-Based video preview<\/a>.<\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":27905,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[134,372,382,386,371,303],"class_list":["post-27904","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-guest-post","tag-nuxtjs","tag-player-video","tag-transform","tag-under-review","tag-video"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Video thumbnail with preview on hover in Nuxtjs<\/title>\n<meta name=\"description\" content=\"This post will discuss how to create a video thumbnail with a preview on hover in Nuxtjs.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Video thumbnail with preview on hover in Nuxtjs\" \/>\n<meta property=\"og:description\" content=\"This post will discuss how to create a video thumbnail with a preview on hover in Nuxtjs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-24T19:58:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-02T21:10:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1681925931\/Web_Assets\/blog\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec-png?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"1012\" \/>\n\t<meta property=\"og:image:height\" content=\"506\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Video thumbnail with preview on hover in Nuxtjs\",\"datePublished\":\"2022-03-24T19:58:17+00:00\",\"dateModified\":\"2025-03-02T21:10:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/\"},\"wordCount\":8,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925931\/Web_Assets\/blog\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec.png?_i=AA\",\"keywords\":[\"Guest Post\",\"NuxtJS\",\"Player Video\",\"Transform\",\"Under Review\",\"Video\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/\",\"url\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/\",\"name\":\"Video thumbnail with preview on hover in Nuxtjs\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925931\/Web_Assets\/blog\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec.png?_i=AA\",\"datePublished\":\"2022-03-24T19:58:17+00:00\",\"dateModified\":\"2025-03-02T21:10:34+00:00\",\"description\":\"This post will discuss how to create a video thumbnail with a preview on hover in Nuxtjs.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925931\/Web_Assets\/blog\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925931\/Web_Assets\/blog\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec.png?_i=AA\",\"width\":1012,\"height\":506},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Video thumbnail with preview on hover in Nuxtjs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Video thumbnail with preview on hover in Nuxtjs","description":"This post will discuss how to create a video thumbnail with a preview on hover in Nuxtjs.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/","og_locale":"en_US","og_type":"article","og_title":"Video thumbnail with preview on hover in Nuxtjs","og_description":"This post will discuss how to create a video thumbnail with a preview on hover in Nuxtjs.","og_url":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/","og_site_name":"Cloudinary Blog","article_published_time":"2022-03-24T19:58:17+00:00","article_modified_time":"2025-03-02T21:10:34+00:00","og_image":[{"width":1012,"height":506,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1681925931\/Web_Assets\/blog\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec-png?_i=AA","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/"},"author":{"name":"","@id":""},"headline":"Video thumbnail with preview on hover in Nuxtjs","datePublished":"2022-03-24T19:58:17+00:00","dateModified":"2025-03-02T21:10:34+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/"},"wordCount":8,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925931\/Web_Assets\/blog\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec.png?_i=AA","keywords":["Guest Post","NuxtJS","Player Video","Transform","Under Review","Video"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/","url":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/","name":"Video thumbnail with preview on hover in Nuxtjs","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925931\/Web_Assets\/blog\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec.png?_i=AA","datePublished":"2022-03-24T19:58:17+00:00","dateModified":"2025-03-02T21:10:34+00:00","description":"This post will discuss how to create a video thumbnail with a preview on hover in Nuxtjs.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925931\/Web_Assets\/blog\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925931\/Web_Assets\/blog\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec.png?_i=AA","width":1012,"height":506},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-video-thumbnail-with-preview-on-hover-in-nuxtjs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Video thumbnail with preview on hover in Nuxtjs"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":""}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925931\/Web_Assets\/blog\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec\/6d30e13abbe359268f127234eeab3e4ab4df9dc3-1012x506-1_27905b4bec.png?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=27904"}],"version-history":[{"count":1,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27904\/revisions"}],"predecessor-version":[{"id":37086,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27904\/revisions\/37086"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/27905"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=27904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=27904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=27904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}