Cloudinary Blog
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

Automatically moderate your user uploaded images

Allowing your users to upload their own images to your website can increase user engagement, retention and monetization. However, allowing your users to upload any image they want to, may lead to some of your users uploading inappropriate images to your application. These images may offend other users or even cause your site to violate standards or regulations.

Read more
Creating HTML5 Animations

HTML5 is the latest evolution of the HTML standard. It is bundled with a lot of new elements and attributes that makes semantics, connectivity, performance, device access, 2D/3D graphics, animation and styling better on the web.

Read more
Cloudinary Uses Scale API to Focus on Image Compression

Here at Cloudinary, we provide a cloud-based tool that enables our users to compress images and video for their websites and apps. Our goal is to preserve the visual integrity of the content, but deliver the smallest file size to any device or browser to ultimately optimize website performance and end user satisfaction.

Read more
CloudinaryAndroid SDK

Developing applications for mobile consumption requires facing, and overcoming, some difficult challenges. Apps need to limit their RAM, CPU and battery usage while still performing the required tasks in a reasonable time frame. If too many background tasks are running, the mobile device can become sluggish, with the battery running out very quickly. Coordination with other apps is crucial to keep the device responsive and make the battery last longer.

Read more
forLoop: Nigeria Event on Building for The Next Billion Users

TL;DR

Since Google shared their intent for the next billion internet users, some African developers thought this was pointing right at them and they needed to act fast. The mission to bring the next billion users from Africa to the internet kicked off a storm of enthusiasm. This community event turned into a success story and this is a summary of what happened.

Read more