Cloudinary Blog

Creating a Vue Camera App for Cloudinary’s Service

Creating a Vue Camera App for Cloudinary’s Service

I’m a developer turned instructional designer. In fact, I’ve been coding professionally since graduate school in the mid-1980s and have worked through many iterations of delivering apps to users over the decades. It just keeps getting to be more and more fun!

Most of my work involved building business-oriented apps, ranging from creating dashboards for hospital patient charts to configuring software-defined networking (SDN). An experience worth sharing is that during a teaching stint a few years ago, I accepted an invitation to participate in an art show for coders. The participants were given a free rein on what to build except that they must write and use open-source code for their apps.

Webinar
How to Optimize for Page Load Speed

My Camera App

Because I was drawn to node-camera and CSS filters, two technologies that I believed worked well together, I created a full-stack node app to access a device camera through a back-end C++ app and then used web sockets to push images to a browser with front-end JavaScript that changed the CSS filters every 30 seconds. Talk about labor-intensive! You’ll see from the code that I could have streamlined the process by far.

For the art patrons, the camera was a fascinating experience. They would have their picture taken, after which that picture would be displayed on a wall and transformed into color, sepia, and Andy Warhol art-like images. People would pose and then watch for the transformed pictures.

Why did I develop such an app? Well, I’d long been programming inside the browser, which was a closed container. I had no access to content outside my website’s file system, much less any functionality associated with the device I was on. My project was to share the device with a browser. However, the technique I used was overkill because many browser APIs, such as WebRTC, were available for easily accessing data, including media generated by cameras, outside the browser.

The Cloudinary Connection

I knew about Cloudinary even while teaching and recommended its service to students for its tremendous help in preparing images for web development. After joining Cloudinary last fall, I set about to learn its product features in depth and it dawned on me that I could best do that by creating a front-end app with the tools and frameworks that I had been teaching students before.

To combine my interest in taking pictures from within the browser with Cloudinary’s superb capabilities of storing, transforming, and delivering images, I came up with Vue Camera, a Vue.js app that takes pictures with WebRTC APIs. You can then download or store those pictures in a Cloudinary account. Because the app also wraps a Cloudinary Product Gallery widget, if you have stored pictures in your Cloudinary account, you can view them in the app itself. Also, since Vue Camera is a responsive app, you can run it on your phone and take both selfies and elsies (opposite of selfies).

During the development process, I took pictures of myself for testing. My Cloudinary account is full of images like this one:

Becky

Your Turn to Try It Out

Want to try out Vue Camera yourself? Either as a developer or as someone interested in what one can do with Cloudinary’s capabilities, you’ll have a lot of pictures like the one above in your Cloudinary account unless you open Vue Camera on your phone. Be sure to give the device permission when prompted so that the webpage can access your camera.

To store images on Cloudinary so as to take advantage of the Product Gallery widget, perform these two steps first:

  1. Create a free Cloudinary account.
  2. Create an unsigned upload preset.

Once you have been assigned a cloud name and have set up a preset, click Vue Camera’s gear icon and enter their values into the text fields in the Cloudinary Upload Info form that pops up. You’re then ready to upload pictures.

gear icon cloudname Start taking elsies from your phone and display them in your gallery. See the examples below. vue-dog

Check out my next post as it details the development process for the Vue Camera.

About Cloudinary

Cloudinary provides easy-to-use, cloud-based media management solutions for the world’s top brands. With offices in the US, UK and Israel, Cloudinary has quickly become the de facto solution used by developers and marketers at major companies around the world to streamline rich media management and deliver optimal end-user experiences.

For more information, visit www.cloudinary.com or follow us on Twitter

Recent Blog Posts

New Learning Pathways From the Cloudinary Academy

In December 2019, Cloudinary launched its customer education platform, the Cloudinary Academy, replete with courses taught by the company’s experts on developer-oriented products and digital asset management (DAM) solution. The courses comprise interactive lessons and hands-on assignments, a proven way of familiarizing the audience with the course material and illustrating it with live examples.

Read more
Maya Shavin: How I Built My Website

Besides working as a senior front-end developer at Cloudinary, I'm also a content creator, a blogger, and an open-source developer. Follow me at @mayashavin and on mayashavin.com.

In the beginning, my website, mayashavin.com, was mainly for showcasing the status of my development projects and keeping me organized with my speaking schedule. Initially, I built it with Vue.js, later on switching to Nuxt.js (aka Nuxt) for a higher SEO score, and deployed it with Netlify. After some time, I added a blog section with Netlify CMS as the content management system (CMS). Everything was fine until I added more content and features, which led to a significant decline in the site’s performance. Also, the site design needed a modern look. So, I gave the site a makeover.

Read more
Automation Frees Up PetRescue’s Staff to Help Pets Find Their Forever Homes

As we spend more time at home, many of us are adopting pets for the joy, companionship and a surprising range of health benefits. In Australia, where our nonprofit customer PetRescue is located, there’s a shortage of pets to adopt. Last August, the Guardian reported that dog shelters in Australia emptied and adoption fees for puppies were running as high as $AUS1800.

Read more
Cloudinary and Contentful Make Modern Content Management Easier

I am pleased to share that Cloudinary and Contentful have joined forces to further streamline the creation, processing, and delivery of online content through Cloudinary’s digital asset management (DAM) solution and advanced transformation and delivery capabilities for images and video. What’s more, the partnership delivers a headless approach to DAM. By leveraging APIs for media management tasks, marketers and developers alike benefit from an integrated stack of optimized assets for optimization and automation. As a result, page loads are fast and beautiful, and at scale—with less overhead and effort.

Read more
Introducing Cloudinary's Nuxt Module

Since its initial release in October 2016 by the Chopin brothers as a server-side framework that runs on top of Vue.js, Nuxt (aka Nuxt.js) has gained prominence in both intuitiveness and performance. The framework offers numerous built-in features based on a modular architecture, bringing ease and simplicity to web development. Not surprisingly, Nuxt.js has seen remarkable growth in adoption by the developer community along with accolades galore. At this writing, Nuxt has earned over 30K stars on GitHub and 96 active modules with over a million downloads per month. And the upward trend is ongoing.

Read more