Skip to content

Help users 'toon' into your site with a cartoon effect

We all know that images attract interest and increase engagement, but with the huge overload of images out there, we sometimes need to get creative to stand out in the crowd. Your users who upload photos to your site or app may also be looking for those same creative opportunities. A quick look at the most popular social media apps and their continually increasing toolbox of special photo effects shows the increasing trend in popularity and demand for these fun ways of expressing one’s identity.

Cartoonifying a photo is one great way to accomplish this.

Graphic designers can manually apply a cartoon effect to photos using a combination of features in sophisticated graphics applications. There are also a variety of online applications where you can upload a photo and get a cartoon version (of varying quality) returned. But these manual methods don’t scale if you have many photos where you want to apply this effect. And offering this feature to your users for the content they upload to your site requires a complex algorithm.

In short, you need a simple way to apply cartoon effects programmatically.

Cloudinary’s image management solution includes a broad set of cloud-based image transformation capabilities. The transformation takes place on-the-fly when the dynamic image URLs are first accessed, and then they are immediately cached on CDN servers for even faster delivery.

The new cartoonify effect is yet another way that Cloudinary enables its customers to quickly, easily, and optimally deliver transformed photos that have just the right impact. With a single parameter and a couple optional attributes, you can give any image a unique cartoonified look and feel.

For a default cartoonify effect, it couldn’t be simpler! Just add the cartoonify parameter (e_cartoonify) to your image tag definition, and the original image gets cartoonified and delivered on-the-fly. Of-course you can also combine this cartoon effect with any other transformation your heart desires.

Original Original Cartoonified Cartoonified Cartoon and other transformations Cartoon and
other transformations

Here’s the transformation code for that last image, which takes advantage of the text overlay, placement gravity, radius, outline, and background color features, in addition to cartoonify:

Loading code examples

For more details on all the available transformations, see the image transformation guide and reference.

For added control on your cartoonified image, you can adjust the line strength of the black outlines and the color reduction impact. (As you increase the color_reduction value, and thus decrease the number of colors in the image, the image also gets a higher saturation boost, and a few other adjustments, all leading to a less realistic look).

For example, the following images show the original image, compared to cartoonified versions with different adjustments in line strength and color reduction.

Original Original

Above average line thickness, below average color reduction Above average line thickness, below average color reduction

Below average line thickness, above average color reduction Below average line thickness, above average color reduction

And here’s what your code would look like for the last cartoonified car: Loading code examples

Oh, and you can also choose to generate a black and white cartoon if that suits your fancy.

Original Above average line thickness, below average color reduction

Loading code examples

Details for all of the above can be found in the effect parameter section of the image transformation reference.

Looks like fun, doesn’t it? Want to try it yourself?

Click one of the images below or   

Upload an image

dog guitarist beach flowers golden gate

Adjust line strength: APPLY     Adjust color reduction: APPLY
* Enter values between 1-100. For black and white, enter ‘bw’ in color reduction.    

Yes, it’s that simple: one parameter added to your delivery URL or passed on as an option to your users when they upload their profile pics or other images, and the required cartoonification algorithms are automatically applied to the photo.

And don’t forget that cartoon-like images are more than just another cool effect. Cartoonified images can help capture an audience, and they may be more memorable to your users among the plethora of regular photos in every web page on the net.

Additionally, when used in the appropriate context, cartoonified images may be able to express an intended tone, emotion, or personality better than the original photo. And according to marketing consultant, Marcia Hoeck, emotion is (not surprisingly) better at triggering the circuits in the brain that activate behavior and decisions than logic is.

You now know how simple it can be to programmatically cartoonify any image with Cloudinary. And you can do it with any Cloudinary account, including a free one.

So the next time you are looking for just the right creative image that will get your users to tune into your message, consider ’tooning it.

Back to top

Featured Post