Cloudinary Blog

How Mediavine handled image load in a 50M+ page-views Rails site

by Itai Lahan
We are often asked to share our customer stories with the rest of the Cloudinary community. Whether it's for learning about others experiences managing images with Cloudinary, or just to reaffirm Cloudinary's solution - we love to hear your stories and we're happy to share them.
Today, we wanted to introduce you to Mediavine Inc., one of the largest online entertainment networks on the web, and how they utilized Cloudinary to solve their image management needs.

The customer

Mediavine, Inc. owns and operates some of the web's largest entertainment and lifestyle properties. Mediavine's network of sites include:

       TV Fanatic

        Movie Fanatic
       Food Fanatic

Combined, these websites garner a traffic of nearly 50 million page views a month. 
As modern media outlets go, Mediavine's websites are incredibly image rich. 

The challenge

Mediavine's sites run on a custom Ruby on Rails CMS hosted on Heroku. Like many other Rails sites, they started off using the Carrierwave and mini_magick gems to handle their image needs. 
However, as their page views and image processing needs grew, they quickly ran into performance problems
"No matter how much we optimized image uploads - including moving all version processing to background workers - uploading several high resolution files was just not going to be possible through the dyno manifold." Says Eric Hochberger, founder and head of development at Mediavine. "We knew we needed to go directly to our image store, S3. We looked into rolling out our own solutions, such as carrierwave_direct, but they were far too complex after way too many hours of struggling. And they would still require additional image processing!"

The solution

We asked Eric if he could share his experience with Cloudinary: 
"With Cloudinary we got direct upload to the cloud working within minutes. But it didn't just stop there. Cloudinary solved our timeout issue, while greatly speeding up our uploading process, thanks to its easy-to-implement javascript upload." Eric said.
"Cloudinary did more than that though. It helped us solve problems we had previously never thought were fixable," Eric added. "Scaling animated gifs worked perfectly without any of our previous imagemagick glitches. As for face detection we thought only the geniuses at Facebook could possess?  Yeah. We have it now. Full ITPC data?  Just try getting that out of mini_magick. Now we can pull locations out of images."
What about the integration with Cloudinary? "This all came in ridiculously easy fashion. Really, when it comes to any headaches with dealing with images, Cloudinary has solved them all. Its URLs even solve CDN cache busting. Working with Cloudinary's gem and carrierwave implementation has been a programmer's dream."


"It's rare when you can outsource a problem and save money but somehow Cloudinary managed to do that." says Eric. "We were able to knock our direct image hosting costs in half from S3/CloudFront, thanks to Cloudinary's generous pricing and optimization. Even better, we were able to significantly reduce Heroku usage, courtesy of seriously reducing worker dynos with outsourcing thumbnail and version generation. Talk about a win-win."
"Even if you have a 'working' solution," continues Eric, "we promise Cloudinary will do it better. Don't worry if you have to migrate from an existing system. They even come with code to help you do that. We had our hundreds of thousands of images migrated in less than an hour. And thanks to the fact they support carrierwave, we had minimal code changes."

Final words

We were very impressed by just how fast Mediavine managed to wrap their heads around the Cloudinary service, migrate their images and complete the full integration. 
We are extremely excited to have Mediavine using Cloudinary, and wanted to thank Eric for taking the time and sharing his experience.
Cloudinary users - let us know if you want to share your own unique experience using Cloudinary. We'd love to feature your services here and we're sure that all of Cloudinary's customers will find your insights helpful.

Recent Blog Posts

How to generate waveform images from audio files

by Meir Feinberg
How to generate waveform images from audio files

Many social networks, websites and messaging applications allow users to upload a wide variety of media files, and although the majority of files are in the form of images and video clips, a significant minority are audio files. When the website or application subsequently needs to display a thumbnail that describes the uploaded content, images can be cropped and resized down to scale, and a single frame from a video clip can be converted to an image and then also cropped and resized down to scale.

Read more
5 ways to optimize images for effective social sharing

As a website/app developer or owner, you’ve undoubtedly experienced your fair share of glitches and mishaps when it comes to users or site visitors sharing your content. Many outlets such as news and media sites, social networks, or e-commerce sites include the option to "like" or "share" content such as blog posts or images. Once shared, the social network site displays a snippet of the shared content alongside a featured image. This way, your site content gets maximum exposure in social networks and attracts additional visitors.

Read more
Google's new logo might not be as small as claimed

The Internet was abuzz last week after the announcement of Google’s new logo. What caught our eyes more than the artistic changes was this sentence on Google's blog: "building a special variant of our full-color logo that is only 305 bytes, compared to our existing logo at ~14,000 bytes". Sounds exciting! But is it correct?

Read more
Transcode, convert, resize, crop and manipulate videos

Videos are becoming more prolific with people having the capability to capture videos with a wide variety of cameras, including smartphone cameras that are available almost everywhere. Web and mobile applications that display videos online can be faced with a challenge when the videos are created or uploaded from different devices and in various formats, and then need to be delivered in a multitude of resolutions and aspect ratios to various web browsers, laptops and all kinds of mobile devices in HTML5 web friendly video formats.

Read more

Taking the labor out of baby books

by Nicole Amsler
How Baby's Firsts save development time with Cloudinary
Cloudinary helps Baby’s Firsts App deliver images quickly and preserve consistency from app to print. Baby’s Firsts is a free iPhone app that helps parents collect photos, instantly share photos via Facebook, Twitter and Flickr, and produce photo albums of their baby’s first year. Using more than 300 creative, developmentally timed reminders to capture key moments and milestones, the easy-to-navigate app enables parents to store photos in the cloud and create customized photo pages that are then transformed into heirloom-quality, printed baby books. 
Read more

Lossy compression for optimizing animated GIFs

by Meir Feinberg
How to optimize animated GIFs with lossy compression

Animated GIFs keep getting more and more popular, but they are generally very big files with slow loading times and high bandwidth costs, while the format itself is quite old and not optimized for modern video clips. As developers, you need to allow users to upload their animated GIF files, but you also need to deliver them optimized, which can be a complex, time consuming process.

Read more