{"id":22444,"date":"2021-12-01T15:36:25","date_gmt":"2021-12-01T15:36:25","guid":{"rendered":"http:\/\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary"},"modified":"2022-09-23T10:11:19","modified_gmt":"2022-09-23T17:11:19","slug":"applying_awesome_image_effects_in_nuxt_applications_with_cloudinary","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary","title":{"rendered":"Applying Awesome Image Effects in Nuxt Applications With Cloudinary"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p>Nowadays, no way can we build modern apps for the web without considering visuals, which are one of the most efficient ways of communicating online. However, improvements in image quality over the years have exacted a price in larger files, slowing down page loads, especially in low-bandwidth regions or on mobile devices. To resolve that conundrum, turn to Cloudinary, a platform that offers the infrastructure for managing images in web apps. Additionally, Cloudinary\u2019s reliable APIs serve visuals through multiple, fast content delivery networks (CDNs).<\/p>\n<p>This article describes how to save, display, and transform images in a Nuxt app with Cloudinary. Of remarkable help is Cloudinary\u2019s npm package, which abstracts all the processes in Nuxt. You upload images with <code>this.$cloudinary.upload<\/code>and view them with the custom, out-of-the-box component <code>&lt;cld-image\/&gt;<\/code>.<\/p>\n<h2>Getting Started With Nuxt<\/h2>\n<p>First, integrate Cloudinary with Nuxt by means of a simple project, in which you\u2019ll upload an image to Cloudinary and then transform the image. For the code for a more complex app, check out the <a href=\"https:\/\/github.com\/cloudinary-devs\/cloudybadge\">CloudyBadge project<\/a>.<\/p>\n<p>Follow these steps:<\/p>\n<ol>\n<li>\n<p>Verify if you have installed Node.js on our computer by typing this command on a terminal:<\/p>\n<p><code>node -v<\/code><\/p>\n<p>If the output shows that Node.js is not in your computer, <a href=\"https:\/\/nodejs.org\/en\/download\/\">download the latest version<\/a>.<\/p>\n<\/li>\n<li>\n<p>Scaffold a new project called <code>nuxt-cloudinary<\/code> with this npm command:<\/p>\n<p><code>npx create-nuxt-app nuxt-cloudinary<\/code><\/p>\n<p>After a few installations, several prompts are displayed. Pick as many settings as you desire, but be sure to choose <strong>Universal (SSG\/SSR)<\/strong> for rendering.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/image\/upload\/c_fill,f_auto,q_auto\/Web_Assets\/blog\/universal-terminal.png\" alt=\"Universal\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"512\" height=\"135\"\/><\/p>\n<\/li>\n<li>\n<p>Go to the <code>nuxt-cloudinary<\/code> directory with the command <code>cd nuxt-cloudinary<\/code> and then launch your server by typing <code>npm run dev<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>Optional.<\/strong> Clone the project\u2019s complete code <a href=\"https:\/\/github.com\/contentlab-io\/cloudinary-nuxt-demo\">on GitHub<\/a> to your machine. Having a copy of the code handy makes it easier to follow the next steps.<\/p>\n<\/li>\n<\/ol>\n<h2>Getting Started With Cloudinary<\/h2>\n<p>If you don\u2019t have one yet, <a href=\"https:\/\/cloudinary.com\/users\/register_free\">sign up<\/a> for a free Cloudinary account, which offers you credits for transformations, storage, and bandwidth. Alternatively, upgrade to a paid account for more credits and other features.<\/p>\n<h3>Installation<\/h3>\n<p>Do the following:<\/p>\n<ol>\n<li>\n<p>Install the <code>@nuxtjs\/cloudinary<\/code> dependency to your Nuxt project. Type:<\/p>\n<p><code>npm install @nuxtjs\/cloudinarynpm install @nuxtjs\/cloudinary<\/code><\/p>\n<\/li>\n<li>\n<p>Add <code>@nuxtjs\/cloudinary<\/code> as a module in the <code>modules<\/code> sections of your <code>nuxt.config.js<\/code> file:<\/p>\n<pre class=\"js-syntax-highlighted\"><code>export default {\n  modules: [\n    '@nuxtjs\/cloudinary'\n  ]\n}\n<\/code><\/pre>\n<\/li>\n<li>\n<p>Create a <code>.env<\/code> file to hold your three credentials:<\/p>\n<pre class=\"js-syntax-highlighted\"><code>CLOUDNAME=YOUR_CLOUD_NAME\nAPI_KEY=YOUR_API_KEY\nAPI_SECRET=YOUR_API_SECRET\n<\/code><\/pre>\n<p>The credentials\u2019 values are displayed on your Cloudinary dashboard.<\/p>\n<\/li>\n<li>\n<p>Open the <code>nuxt.config.js<\/code> file, which was generated in your project\u2019s root directory by <code>create-nuxt<\/code>, and create a Cloudinary object that encompasses the credentials in your <code>.env<\/code> file:<\/p>\n<pre class=\"js-syntax-highlighted\"><code>cloudinary: {\n    cloudName: process.env.CLOUDNAME,\n    apiKey: process.env.API_KEY, \n    apiSecret: process.env.API_SECRET, \n    useComponent: true \n}\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<div class='c-callout  c-callout--inline-title c-callout--note'><strong class='c-callout__title'>Note:<\/strong> <p>Setting <code>useComponent<\/code> to <code>true<\/code> means that you can use the out-of-the-box <a href=\"https:\/\/cloudinary.nuxtjs.org\/usage\/vue-components\">Vue components<\/a> with the <code>@nuxtjs\/cloudinary<\/code> library.<\/p><\/div>\n<p>Your <code>nuxt.config.js<\/code> file now reads like this:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> {\n  <span class=\"hljs-attr\">head<\/span>: {\n    <span class=\"hljs-attr\">title<\/span>: <span class=\"hljs-string\">'nuxt-cloudinary'<\/span>,\n    <span class=\"hljs-attr\">htmlAttrs<\/span>: {\n      <span class=\"hljs-attr\">lang<\/span>: <span class=\"hljs-string\">'en'<\/span>\n    },\n    <span class=\"hljs-attr\">meta<\/span>: &#91;\n      { <span class=\"hljs-attr\">charset<\/span>: <span class=\"hljs-string\">'utf-8'<\/span> },\n      { <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">'viewport'<\/span>, <span class=\"hljs-attr\">content<\/span>: <span class=\"hljs-string\">'width=device-width, initial-scale=1'<\/span> },\n      { <span class=\"hljs-attr\">hid<\/span>: <span class=\"hljs-string\">'description'<\/span>, <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">'description'<\/span>, <span class=\"hljs-attr\">content<\/span>: <span class=\"hljs-string\">''<\/span> }\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  },\n  <span class=\"hljs-attr\">components<\/span>: <span class=\"hljs-literal\">true<\/span>,\n  <span class=\"hljs-attr\">modules<\/span>: &#91;\n    <span class=\"hljs-string\">'@nuxtjs\/cloudinary'<\/span>\n  ],\n  <span class=\"hljs-comment\">\/\/ Build configuration: https:\/\/go.nuxtjs.dev\/config-build.<\/span>\n  <span class=\"hljs-attr\">build<\/span>: {\n  },\n  <span class=\"hljs-attr\">cloudinary<\/span>: {\n    <span class=\"hljs-attr\">cloudName<\/span>: process.env.CLOUDNAME,\n    <span class=\"hljs-attr\">apiKey<\/span>: process.env.API_KEY, <span class=\"hljs-comment\">\/\/Needed only if you are using server-side upload.<\/span>\n    <span class=\"hljs-attr\">apiSecret<\/span>: process.env.API_SECRET, <span class=\"hljs-comment\">\/\/Needed only if you are using server-side upload.<\/span>\n    <span class=\"hljs-attr\">useComponent<\/span>: <span class=\"hljs-literal\">true<\/span> <span class=\"hljs-comment\">\/\/Use Vue components.<\/span>\n  }\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><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<h2>Creation of an Upload Preset<\/h2>\n<p>Upload preset is a default behavior that reduces repetition on upload requests through saved settings. You can set up multiple presets.<\/p>\n<p>To create an upload preset:<\/p>\n<ol>\n<li>\n<p>Click the <strong>Upload<\/strong> tab near the top of your Cloudinary settings page.<\/p>\n<p>Under <strong>Upload presets<\/strong>, two modes are displayed: unsigned and signed. A signed upload preset applies to secured (server-side) uploads; an unsigned one, browser (client-side) uploads.\n<img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/image\/upload\/c_fill,f_auto,q_auto,dpr_2.0\/Web_Assets\/blog\/upload-presets-nuxt.jpg\" alt=\"Upload preset\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"512\" height=\"269\"\/><\/p>\n<\/li>\n<li>\n<p>Note the name of the unsigned upload preset, which you\u2019ll need later for client-side uploads.<\/p>\n<\/li>\n<\/ol>\n<h2>Image Uploads<\/h2>\n<p>To upload images to Cloudinary:<\/p>\n<ol>\n<li>\n<p>Go to your component (<code>pages\/index.vue<\/code>) and add the <code>&lt;input\/&gt;<\/code> element that uploads files.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-2\" 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\">input<\/span>\n  <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"file-input\"<\/span>\n  <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\">\"file\"<\/span>\n  <span class=\"hljs-attr\">ref<\/span>=<span class=\"hljs-string\">\"fileInput\"<\/span>\n  <span class=\"hljs-attr\">accept<\/span>=<span class=\"hljs-string\">\"image\/*\"<\/span>\n  @<span class=\"hljs-attr\">change<\/span>=<span class=\"hljs-string\">\"onFilePicked\"<\/span>\n  <span class=\"hljs-attr\">required<\/span>\n\/&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><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><code>@change<\/code> triggers the <code>onFilePicked<\/code> function when you select an image; <code>ref<\/code> gets data from <code>&lt;input\/&gt;<\/code>.<\/p>\n<\/li>\n<li>\n<p>Add <code>data<\/code> to your components to manage their state.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">data() {\n  <span class=\"hljs-keyword\">return<\/span> {\n    <span class=\"hljs-attr\">formData<\/span>: {\n      <span class=\"hljs-attr\">imageName<\/span>: <span class=\"hljs-string\">\"\"<\/span>,\n      <span class=\"hljs-attr\">imageUrl<\/span>: <span class=\"hljs-string\">''<\/span>\n    }\n  }\n};\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><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<\/li>\n<\/ol>\n<p>You store the image name and URL before uploading the image. When you attach the image, <code>onFilePicked<\/code> sends the name and the image in Base64 format to Cloudinary through the FileReader Web API.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">methods: {\n  onFilePicked(event) {\n    <span class=\"hljs-keyword\">const<\/span> files = event.target.files;\n    <span class=\"hljs-keyword\">const<\/span> fileReader = <span class=\"hljs-keyword\">new<\/span> FileReader();\n    fileReader.addEventListener(<span class=\"hljs-string\">\"load\"<\/span>, () =&gt; {\n      <span class=\"hljs-keyword\">this<\/span>.formData.imageUrl = fileReader.result;\n      <span class=\"hljs-built_in\">console<\/span>.log(<span class=\"hljs-keyword\">this<\/span>.formData.imageUrl)\n    });\n    fileReader.readAsDataURL(files&#91;<span class=\"hljs-number\">0<\/span>]);\n    <span class=\"hljs-keyword\">const<\/span> fileName = <span class=\"hljs-keyword\">this<\/span>.$refs.fileInput.value;\n    <span class=\"hljs-keyword\">this<\/span>.formData.imageName = fileName.split(<span class=\"hljs-string\">\"\\\\\"<\/span>).pop().replace(<span class=\"hljs-regexp\">\/\\.&#91;^\/.]+$\/<\/span>, <span class=\"hljs-string\">\"\"<\/span>);\n  }\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><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>Create a button to trigger the function that initiates the upload:<\/p>\n<p><code>&lt;button @click=&quot;cloudinary&quot;&gt;Upload&lt;\/button&gt;<\/code><\/p>\n<p>Within that function is <code>this.$cloudinary.upload<\/code>, which is available globally through the library you installed.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">methods: {\n  cloudinary() {\n    <span class=\"hljs-keyword\">this<\/span>.$cloudinary\n      .upload(<span class=\"hljs-keyword\">this<\/span>.formData.imageUrl, {\n        <span class=\"hljs-attr\">public_id<\/span>: <span class=\"hljs-keyword\">this<\/span>.formData.imageName,\n        <span class=\"hljs-attr\">folder<\/span>: <span class=\"hljs-string\">\"content\"<\/span>,\n        <span class=\"hljs-attr\">upload_preset<\/span>: <span class=\"hljs-string\">\"your-preset-name\"<\/span>\n      })\n      .then(<span class=\"hljs-function\"><span class=\"hljs-params\">res<\/span> =&gt;<\/span> <span class=\"hljs-built_in\">console<\/span>.log(res))\n      .catch(<span class=\"hljs-function\"><span class=\"hljs-params\">err<\/span> =&gt;<\/span> cosole.log(err));\n  },\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><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>You\u2019re sending the image in Base64 format in <code>this.formData.imageUrl<\/code>. The public ID (as denoted by <code>public_id<\/code>) represents the image name. The folder takes the name of the Cloudinary folder where you save the image, and then you add the name of the upload preset you created earlier.<\/p>\n<p>Here\u2019s an example of the response, which contains all the relevant information, including a link to the image hosted on Cloudinary, the image format, and the public ID:<\/p>\n<pre class=\"js-syntax-highlighted\"><code>{\n  access_mode: &quot;public&quot;\n  asset_id: &quot;952a355221ce840b1f4fcd91b93a2021&quot;\n  bytes: 12701\n  created_at: &quot;2021-10-07T07:55:48Z&quot;\n  etag: &quot;1bd19b75a275ee715b1130e72ba6e985&quot;\n  existing: false\n  format: &quot;png&quot;\n  height: 1080\n  placeholder: false\n  public_id: &quot;content\/Bmvp (1)&quot;\n  resource_type: &quot;image&quot;\n  secure_url: &quot;https:\/\/res.cloudinary.com\/dfkuxnesz\/image\/upload\/v1633593348\/content\/Bmvp%20%281%29.png&quot;\n  signature: &quot;d74486803815e872ca92ddabbc361351ad13ea83&quot;\n  tags: []\n  type: &quot;upload&quot;\n  url: &quot;http:\/\/res.cloudinary.com\/dfkuxnesz\/image\/upload\/v1633593348\/content\/Bmvp%20%281%29.png&quot;\n  version: 1633593348\n  version_id: &quot;6b3e6b601197ac0ba28bc9da5a377b16&quot;\n  width: 1080\n}\n<\/code><\/pre>\n<h2>Display of Cloudinary Images Through Vue Components<\/h2>\n<p>Now display the uploaded image with the Vue component <code>&lt;cld-image\/&gt;<\/code>, which requires a few parameters, including the public ID you received after uploading the image.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-6\" 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\">cld-image<\/span>\n  <span class=\"hljs-attr\">public-id<\/span>=<span class=\"hljs-string\">\"your-public-image-id\"<\/span>\n  <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"200\"<\/span>\n  <span class=\"hljs-attr\">crop<\/span>=<span class=\"hljs-string\">\"scale\"<\/span>\n  <span class=\"hljs-attr\">fetchFormat<\/span>=<span class=\"hljs-string\">\"auto\"<\/span>\n  <span class=\"hljs-attr\">quality<\/span>=<span class=\"hljs-string\">\"auto\"<\/span>\n  <span class=\"hljs-attr\">loading<\/span>=<span class=\"hljs-string\">\"lazy\"<\/span>\n\/&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><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>Be sure to replace <code>your-public-image-id<\/code> with your image\u2019s public ID. The image then shows up in your app, as in this example in the case of two uploaded images:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/image\/upload\/c_fill,f_auto,q_auto,dpr_2.0\/Web_Assets\/blog\/nuxt-app.png\" alt=\"Nuxt app\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"512\" height=\"288\"\/><\/p>\n<h2>Image Transformation<\/h2>\n<p>Suppose you want to automatically create a circular image centered on each person\u2019s face in the above example. That would normally be tough to do in the browser, but not with Cloudinary. Simply transform the images with <code>&lt;cld-transformation\/&gt;<\/code>, like this:<\/p>\n<pre class=\"js-syntax-highlighted\"><code>&lt;cld-image\n  public-id=&quot;\/content\/woman&quot;\n  fetchFormat=&quot;auto&quot;\n  quality=&quot;auto&quot;\n  loading=&quot;lazy&quot;\n&gt;\n  &lt;cld-transformation\n    width=&quot;200&quot;\n    height=&quot;200&quot;\n    gravity=&quot;face&quot;\n    crop=&quot;fill&quot;\n    radius=&quot;max&quot;\n  \/&gt;\n&lt;\/cld-image&gt;\n<\/code><\/pre>\n<p>Here, you set the width and height to 200, resize the image around each person\u2019s face with <code>crop<\/code>, and round off the image border by setting the radius to the maximum. The two transformed images look like this:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/image\/upload\/c_fill,f_auto,q_auto,dpr_2.0\/Web_Assets\/blog\/nuxt-app-circle.png\" alt=\"Circle profile\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"512\" height=\"266\"\/><\/p>\n<p>Easy, right? The nice circular headshots are now ready for display on a profile page. You could also feature them on physical assets like conference badges and ID cards.<\/p>\n<p>The complete <a href=\"https:\/\/github.com\/contentlab-io\/cloudinary-nuxt-demo\">code repository<\/a> is on GitHub.<\/p>\n<h2>Taking Off With Cloudinary<\/h2>\n<p>Cloudinary offers numerous valuable ways for managing images in apps at scale, enabling you to generate smaller yet high-quality images, correspondingly enhancing page performance. Additionally, other Vue components, including <a href=\"https:\/\/cloudinary.nuxtjs.org\/usage\/vue-components#cldvideo\"><code>&lt;cld-video\/&gt;<\/code><\/a> for managing videos, are available from Cloudinary.<\/p>\n<p>All those features are especially helpful for creating social-media apps or photo-management systems, or for scaling side projects. An example: Build a fun photo-management app with Nuxt so that your users can upload pictures to one handy location. Afterwards, the app can edit the pictures with Cloudinary\u2019s image-transformation capabilities for a similar look and a consistent user experience.<\/p>\n<p>Cloudinary is also a big boon for authentication apps, e.g., you can upload profile photos and store their URLs in a database for later use, or pull those photos with the Vue component and set their radius, center them, and round off the border for an appealing look.<\/p>\n<p>Let your imagination fly! Build a fun Nuxt app or spiff up an existing one. As a start, <a href=\"https:\/\/cloudinary.com\/users\/register_free\">register<\/a> for a free Cloudinary account and explore the platform\u2019s site for details on how to forge impressive image effects.<\/p>\n<h2>About the Author<\/h2>\n<p><a href=\"https:\/\/www.linkedin.com\/in\/david-atanda\/\">David Atanda<\/a> is a front-end developer and technical writer dedicated to making the web more accessible while building scalable and high-performance web applications.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":22445,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[165,315],"class_list":["post-22444","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-image-transformation","tag-vue"],"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>How to Apply Riveting Image Effects in Nuxt Applications With Cloudinary<\/title>\n<meta name=\"description\" content=\"A step-by-step tutorial on how to save, display, and transform images in a Nuxt application with Cloudinary.\" \/>\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\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Applying Awesome Image Effects in Nuxt Applications With Cloudinary\" \/>\n<meta property=\"og:description\" content=\"A step-by-step tutorial on how to save, display, and transform images in a Nuxt application with Cloudinary.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-01T15:36:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-09-23T17:11:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1649720281\/Web_Assets\/blog\/Image-transformations-NuxtJS\/Image-transformations-NuxtJS-png?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"1540\" \/>\n\t<meta property=\"og:image:height\" content=\"847\" \/>\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\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Applying Awesome Image Effects in Nuxt Applications With Cloudinary\",\"datePublished\":\"2021-12-01T15:36:25+00:00\",\"dateModified\":\"2022-09-23T17:11:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary\"},\"wordCount\":9,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649720281\/Web_Assets\/blog\/Image-transformations-NuxtJS\/Image-transformations-NuxtJS.png?_i=AA\",\"keywords\":[\"Image Transformation\",\"Vue\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2021\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary\",\"url\":\"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary\",\"name\":\"How to Apply Riveting Image Effects in Nuxt Applications With Cloudinary\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649720281\/Web_Assets\/blog\/Image-transformations-NuxtJS\/Image-transformations-NuxtJS.png?_i=AA\",\"datePublished\":\"2021-12-01T15:36:25+00:00\",\"dateModified\":\"2022-09-23T17:11:19+00:00\",\"description\":\"A step-by-step tutorial on how to save, display, and transform images in a Nuxt application with Cloudinary.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649720281\/Web_Assets\/blog\/Image-transformations-NuxtJS\/Image-transformations-NuxtJS.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649720281\/Web_Assets\/blog\/Image-transformations-NuxtJS\/Image-transformations-NuxtJS.png?_i=AA\",\"width\":1540,\"height\":847},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Applying Awesome Image Effects in Nuxt Applications With Cloudinary\"}]},{\"@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":"How to Apply Riveting Image Effects in Nuxt Applications With Cloudinary","description":"A step-by-step tutorial on how to save, display, and transform images in a Nuxt application with Cloudinary.","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\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary","og_locale":"en_US","og_type":"article","og_title":"Applying Awesome Image Effects in Nuxt Applications With Cloudinary","og_description":"A step-by-step tutorial on how to save, display, and transform images in a Nuxt application with Cloudinary.","og_url":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary","og_site_name":"Cloudinary Blog","article_published_time":"2021-12-01T15:36:25+00:00","article_modified_time":"2022-09-23T17:11:19+00:00","og_image":[{"width":1540,"height":847,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1649720281\/Web_Assets\/blog\/Image-transformations-NuxtJS\/Image-transformations-NuxtJS-png?_i=AA","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary"},"author":{"name":"","@id":""},"headline":"Applying Awesome Image Effects in Nuxt Applications With Cloudinary","datePublished":"2021-12-01T15:36:25+00:00","dateModified":"2022-09-23T17:11:19+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary"},"wordCount":9,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649720281\/Web_Assets\/blog\/Image-transformations-NuxtJS\/Image-transformations-NuxtJS.png?_i=AA","keywords":["Image Transformation","Vue"],"inLanguage":"en-US","copyrightYear":"2021","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary","url":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary","name":"How to Apply Riveting Image Effects in Nuxt Applications With Cloudinary","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649720281\/Web_Assets\/blog\/Image-transformations-NuxtJS\/Image-transformations-NuxtJS.png?_i=AA","datePublished":"2021-12-01T15:36:25+00:00","dateModified":"2022-09-23T17:11:19+00:00","description":"A step-by-step tutorial on how to save, display, and transform images in a Nuxt application with Cloudinary.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649720281\/Web_Assets\/blog\/Image-transformations-NuxtJS\/Image-transformations-NuxtJS.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649720281\/Web_Assets\/blog\/Image-transformations-NuxtJS\/Image-transformations-NuxtJS.png?_i=AA","width":1540,"height":847},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/applying_awesome_image_effects_in_nuxt_applications_with_cloudinary#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Applying Awesome Image Effects in Nuxt Applications With Cloudinary"}]},{"@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\/v1649720281\/Web_Assets\/blog\/Image-transformations-NuxtJS\/Image-transformations-NuxtJS.png?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/22444","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=22444"}],"version-history":[{"count":4,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/22444\/revisions"}],"predecessor-version":[{"id":25173,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/22444\/revisions\/25173"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/22445"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=22444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=22444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=22444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}