Cloudinary Blog

Add the 360 Product Viewer to Your Commerce Site with Cloudinary

How To Make a jQuery 360 Product Viewer

eCommerce is a dynamic business. Visitors are constantly checking sites for the best deals or their favorite products, adding to their wishlists and exploring product recommendations from friends and influencers. At the same time, online vendors rely on numerous techniques - such as optimizing page load time, using sharp product images and aggressively targeting ads - to draw in shoppers and convert clicks into cash.

When looking for that competitive advantage and an improved shopping experience, one way for business owners to stand out is to include a 360 Degree Product Viewer.

This post will show how you can easily build your own 360 degree product viewer.

Note
All code Snippets will be located in gist.github.

First: The Product Photo Shoot

You may have sharp and crisp images of your product. But in this tutorial, we'll take it up a notch by adding a twist. We're going to use a few features unique to Cloudinary. Take a very short video of your product capturing all angles you would like a potential buyer to see once the product is online.

Be sure to get all angles of the wrist watch in a short video

Build the 360 Product Viewer

The 360 Degree Product Viewer requirements:

Set Up

In an index.html file, reference the libraries for the tools mentioned above at the beginning of the file:

Activate Product Upload and Display

In the body of the index.html file, we’ll add the UI container for an upload button and a 360 display product container:

Upload

Let’s add code for the widget function in the <script></script> tag just before the <body> tag.

Note
Replace cloud_name with yours from the Cloudinary dashboard.

We called for the openUploadWidget function, which pops up a display upload widget for us to upload the product video. In the callback function, we computed the frame gap from the video duration and specified amount of frames obtain from the video per time. In this example, it is set to 100. Then Cloudinary calculates the size of the images based on the viewport and calls the build function.

loading

Add the 360 Degree Product View Magic

The build function does the 360 degree magic:

After the video has uploaded, click the image while dragging the cursor from left to right and back. How’s the experience? Check it out for yourself!

360 degree product viewer

Conclusion

The 360 degree product viewing experience gives eCommerce vendors the advantage needed to showcase your product in a more realistic 3D fashion and improve sales. Apart from greatly improving the eCommerce experience, the 360 degree viewer can be used in countless other ways:

  • Travel - Travel experiences are displayed to help travelers understand what to expect before embarking on a journey, from the interior or exterior of a hotel to different adventures.
  • Real Estate - Prospective homeowners can invite themselves into the homes they want to explore.
  • Event Promotion - Showcase your event or venue by enabling attendees to see the event experience at the point of purchase.
  • For fun- Upload your own video now to test it out!

See the full demo in action!

Recent Blog Posts

 New Image File Format: FUIF:Lossy, Lossless, and Free

I've been working to create a new image format, which I'm calling FUIF, or Free Universal Image Format. That’s a rather pretentious name, I know. But I couldn’t call it the Free Lossy Image Format (FLIF) because that acronym is not available any more (see below) and FUIF can do lossless, too, so it wouldn’t be accurate either.

Read more
Optimizing Video Streaming and Delivery: Q&A with Doug Sillars

Doug Sillars, a digital nomad and a freelance mobile-performance expert, answers questions about video streaming and delivery, website optimization, and more.

Doug Sillars, a freelance mobile-performance expert and developer advocate, is a Google Developer Expert and the author of O’Reilly’s High Performance Android Apps. Given his extensive travels across the globe—from the UK to Siberia—with his wife, kids, and 11-year-old dog, Max, he has been referred to as a “digital nomad.” So far in 2018, Doug has spoken at more than 75 meetups and conferences!

Read more
Building a Music Discovery Service

In May 2018, Cloudinary sponsored Capitol Music Group’s first hackathon held by its new Capitol360 Innovation Center, which aims at connecting musicians and software technologists to facilitate and stimulate the creation of music. See this interview for details. As a starter project for the hackathon, we built a sample app called Music Discovery Service.

Read more
Once a Hackathon Participant, Now a Judge

Over the past several years, I've had a chance to participate in hackathons, as part of teams that developed a social payment app and helped users decide meals to cook. But it wasn't until last month that I got to experience a hackathon from the other side, as a judge.

Read more
10 Website Videos Mistakes and How to Solve Them

It should come as no surprise that video use on the internet is exploding. You can see the dramatic growth of video on the average site in this SpeedCurve blog post.

With the growth in video comes greater bandwidth use, which is not only costly for your IT budget, but for your visitors as well. Beyond the expense, there is the user experience to consider. The heavier the page, the longer it will take to load, and the greater likelihood visitors will abandon your site. Page load speed is also an important factor in SEO ranking, so clearly video is something we need to take seriously and get right. Video is challenging, presenting terms still unfamiliar to developers - like codecs, bitrate and adaptive bitrate streaming. As a result, mistakes are being made in video implementation.

Read more
Android Data Saver: Optimizing Mobile Data Usage with Cloudinary

Over the life of a mobile device, the cost of a cellular data plan often exceeds that of the device itself. To optimize data usage and purge useless data on their mobile devices, users can enable Data Saver from Android 7.0 (API level 24). To do so, users toggle Data Saver in quick settings under the Notification shade or under Settings > Data usage. With Data Saver enabled, apps that aren't whitelisted cannot use cellular data in the background. They are also directed to consume less data while active.

Read more