Cloudinary Blog

Media related web development challenges

What to consider when developing media rich websites and apps
Websites have evolved greatly over the past few years. Once text-heavy websites have become more eye-catching with prominent images and video. But the addition of richer media isn’t the only change impacting websites. Consumer behavior also factors into this evolution, as web access has moved from the desktop realm to a variety of different devices – smartphones, tablets, laptops, smartwatches and TVs – with different dimensions and resolutions. And consumers want to be able to access web content anytime and from any location.
 
To ensure that website performance is optimized, bandwidth usage is minimized and users have a top-notch experience, we will need to address many challenges.

High resolution images and videos

If a picture is worth 1,000 words, it’s no surprise that website owners are using images and videos as powerful tools on their websites to engage visitors. High-resolution images look best, but these files are so big that they cause websites to load slowly and use excessive bandwidth. These problems frustrate visitors, and potentially decrease their incentive to  engage further on the website.
 
Loading image
 
Whether your users are visiting your site from a phone or a computer, it’s imperative that it loads quickly. Gabriel A. Mays, founder of Just Add Content, a website platform for businesses, told CIO magazine that developers should “Aim to keep website load time to [a few] seconds or less. Your biggest threat isn't a competitor, it's the back button. If your website loads too slowly, customers won't wait around. They'll go elsewhere.”
 
When addressing these issues:
  • Resize images/videos to match device resolution – One size doesn’t fit all, particularly with the increasing number of devices of different sizes being adopted by consumers.
  • Leverage modern image formats or video codecs – For images, consider using WebP, with automatic fallback to JPEG or other formats for browsers that don’t support newer formats. With video, consider the codecs, frame rate and bit-rate to save file size and bandwidth.
  • Adjust the quality level – There is a tradeoff between compression levels and visual quality to ensure a satisfactory user experience without excessive bandwidth use.
New types of images are introduced almost daily, requiring we stay on trend and learn how to best display them on our websites. For example, Apple introduced Live Photo, kind of a hybrid between a static image and video, combining a photo with other moments before and after it was taken, and displays them with movement and sound. What is the best way to support uploading, transforming and displaying these new forms of content? How might one ensure that these images are bandwidth and storage efficient and visually appealing, regardless of the device where it’s viewed? 

Greater use of video - upstream and downstream

It’s undeniable that video is becoming a primary component on the web – from the videos uploaded by website owners to attract visitors, to the videos being uploaded by users to share with the public. By 2019,  nearly a million minutes of video content will cross the network every second , according to the Cisco Visual Networking Index
 
User uploaded videos
 
As users upload greater quantities of videos, so will grow the task of making videos of various qualities, dimensions and aspect ratios fit into the graphic design of a website or mobile app.
 
But it’s not just the number of minutes of video being uploaded, it’s the resolution. Today’s devices are made to handle high resolution video, and as a result, 4K video is increasing in popularity. But the huge resolution translates into long upload and download times; need for increased storage space; and intensive client-side processing that is required to convert, resize and manipulate these videos.
 
This requires us to normalize and optimize 4K and high-res video specifically for web and mobile devices, and leverage responsive technology that will enable us to deliver the smallest file size while still maintaining the highest visual quality to match the user’s device, browser and network speed.

Responsive design

Probably the most debated issue these days is responsive design. Responsive design enables the same website to adapt to different resolutions, with various techniques, ensuring images and videos look and operate properly on the plethora of devices in use today, at various resolutions. 
 
Google, as well as standards organization W3C, Microsoft and Apple, are all trying to simplify responsive design with solutions built into web browsers. But these aren’t sufficient. For example, the Client Hints solution that’s being promoted by Google is only supported in Chrome, so additional work is required to ensure your images are displayed properly on other browsers.
 
Many devices require responsive design
 
Another option includes relying on the new HTML5 features - specifically the <picture> element and the 'srcset' attribute of the <img> element - to define the various image resolutions and art-directed cropped and manipulated image versions within the HTML code. 
 
There are two problems with this approach: 
  1. Not all browsers support the modern HTML5 features, so workarounds must be developed as a fallback mechanism for browsers that don’t. However Google has been supporting modern HTML5 elements in Chrome for awhile, and Microsoft and Safari are adding support for responsive design to the latest versions of their browsers.
  2. While the browsers automatically select the best matching images for each device and resolution, the browser doesn’t automatically create the images. This requires double (or triple or quadruple…) the work, pre-creating multiple different image versions, or alternatively using a dynamic image manipulation service.
Additionally, these solutions do not focus on finding the appropriate Responsive Breakpoints. When creating a responsive website, choosing the correct image resolutions and how many different image versions to include in your responsive website is called Responsive Breakpoints. 
While breakpoints can technically be any size, ideally they should be set at the optimal resolutions and sizes of images needed to best fit the various devices and screen sizes on which your website will be viewed.
For determining breakpoints, developers need a solution that helps them decide which image resolutions are needed, create multiple images, and integrate with their HTML code or leverage Javascript solutions. 
 
To solve this issue, Cloudinary last year launched a Responsive Image Breakpoints Generator tool, which efficiently and intelligently calculates the image breakpoints.
 
Recently, we also launched our "Auto-everything" solution, taking Cloudinary's cloud-based image management solution to the next level using automatic content-aware and context-aware image adaptation. Within this, we introduced two new transformation parameters, which pair the 'DPR' and 'Width' Client Hints with our existing image resizing and delivery infrastructure, in order to serve up simple, automatic responsive images.

Moving forward

The evolution of video and image formats, coupled with constant innovation in devices and displays, will continue to raise challenges, as developers seek to create a superb user experience while minimizing the impact on bandwidth, storage and website performance.
 
Effectively managing high resolution files, adeptly handling the growing amount of video both incorporated in designs and uploaded by users, and incorporating responsive design techniques as described above can help address some of today’s challenges, and establish a good foundation for future best practices.

Recent Blog Posts

Generate Waveform Images from Audio with Cloudinary

This is a reposting of an article written by David Walsh. Check out his blog HERE!
I've been working a lot with visualizations lately, which is a far cry from your normal webpage element interaction coding; you need advanced geometry knowledge, render and performance knowledge, and much more. It's been a great learning experience but it can be challenging and isn't always an interest of all web developers. That's why we use apps and services specializing in complex tasks like Cloudinary: we need it done quickly and by a tool written by an expert.

Read more
Make All Images on Your Website Responsive in 3 Easy Steps

Images are crucial to website performance, but most still don't implement responsive images. It’s not just about fitting an image on the screen, but also making the the image size relatively rational to the device. The srcset and sizes options, which are your best hit are hard to implement. Cloudinary provides an easier way, which we will discuss in this article.

Read more

The Future of Audio and Video on the Web

By Prosper Otemuyiwa
The Future of Audio and Video on the Web

Web sites and platforms are becoming increasingly media-rich. Today, approximately 62 percent of internet traffic is made up of images, with audio and video constituting a growing percentage of the bytes.

Read more

Embed Images in Email Campaigns at Scale

By Sourav Kundu
Embed Images in Email Campaigns at Scale

tl;dr

Cloudinary is a powerful image hosting solution for email marketing campaigns of any size. With features such as advanced image optimization and on-the-fly image transformation, backed by a global CDN, Cloudinary provides the base for a seamless user experience in your email campaigns leading to increased conversion and performance.

Read more
Build the Back-End For Your Own Instagram-style App with Cloudinary

Github Repo

Managing media files (processing, storage and manipulation) is one of the biggest challenges we encounter as practical developers. These challenges include:

A great service called Cloudinary can help us overcome many of these challenges. Together with Cloudinary, let's work on solutions to these challenges and hopefully have a simpler mental model towards media management.

Read more

Build A Miniflix in 10 Minutes

By Prosper Otemuyiwa
Build A Miniflix in 10 Minutes

Developers are constantly faced with challenges of building complex products every single day. And there are constraints on the time needed to build out the features of these products.

Engineering and Product managers want to beat deadlines for projects daily. CEOs want to roll out new products as fast as possible. Entrepreneurs need their MVPs like yesterday. With this in mind, what should developers do?

Read more