1. Setup Cloudinary
Cloudinary is simple to setup and use. You just need to create an account, after which you’re assigned a cloud storage for your images: Create a FREE Cloudinary account using the signup form.![001](https://www.webdesignerdepot.com/cdn-origin/uploads/2017/07/001-1.jpg)
![002](https://www.webdesignerdepot.com/cdn-origin/uploads/2017/07/002-1.jpg)
2. Upload Images
Now that you have a free Cloudinary account, you can give it a test drive. Go to the Media Library and upload some images to your cloud:![003](https://www.webdesignerdepot.com/cdn-origin/uploads/2017/07/003-1.jpg)
![004](https://www.webdesignerdepot.com/cdn-origin/uploads/2017/07/004-1.jpg)
![005](https://www.webdesignerdepot.com/cdn-origin/uploads/2017/07/005-1.jpg)
Cloudinary Offerings
Before we start implementing the text overlay feature, let me tell you about the core Cloudinary offerings:- Storage: We encountered this feature while uploading images to the server.
- Delivery: The URL we got from the media library is what we use to deliver images from Cloudinary.
- Transformation: Cloudinary enables you to manipulate images by adjusting URL parameters in the delivery URL. The image above is transformed before delivery by adding the transformation parameter 'w_700' which scales the image from it’s original 1,000+ pixel width to 700px.
3. Text Overlay
Text overlays in this context refers to applying characters as a mask on graphic images. This process is commonly used in image editing tools like Photoshop, Sketch or Illustrator, where you import an image to your work art board and use the text control to apply characters above the image. For example:![006](https://www.webdesignerdepot.com/cdn-origin/uploads/2017/07/006-1.jpg)
![007](https://www.webdesignerdepot.com/cdn-origin/uploads/2017/07/007-1.jpg)
http://res.cloudinary.com/christekh/image/upload/w_700/l_text:Verdana_20_bold_underline:JOHNSONS%20PRESENTS,g_north,y_25,co_rgb:F9583C/pexels-photo-341858_hx5cva.jpgThis URL defines the many features going on with this image transformation:
- w_700: Scales down the image to 700px
- l_text: Defines the overlay text to be placed on the an image. This is a transformation feature.
- Verdana: Font style
- 20: Font size
- bold: Font weight
- underline: Text decoration
- JOHNSONS%20PRESENTS: URL encoded overlay text
- g_north: Text location which is top of the image.
- y_25: y axis offset of the text from the top in percentage
- co_rgb:F9583: Text color for the overlay
4. Custom Fonts
Our party banner is taking shape, but to make the banner more festive, we want to add some crazy fonts. We don’t commonly see crazy fonts, hence you shouldn’t expect to see one. This is why you cannot just use l_text:CrazyFont. Cloudinary is very flexible, though. You can upload your own custom font to Cloudinary, then use its public ID as the l_text value. Midnight Valentine is a typical party font that we can use. Download the zipped file, unzip, and upload the .ttf font file. (NB: You can only upload .ttf or .otf fonts.) You need to specify the type as authenticated and resource type as raw. You can do this while uploading via SDKs. Say Node for instance:var cloudinary = require(’cloudinary’)
// Credentials retrieved from dashboard
cloudinary.config({
cloud_name: 'CLOUD_NAME',
api_key: 'API_KEY',
api_secret: 'API_SECRET'
})
cloudinary.v2.uploader.upload(
__dirname + '/Midnight-Valentine.ttf',
{resource_type: 'raw',
type: 'authenticated',
public_id: 'Midnight-Valentine.ttf'},
function(error, result) {
console.log(result, error)
})You can now deliver the image using the custom font we uploaded:
![008](https://www.webdesignerdepot.com/cdn-origin/uploads/2017/07/008-1.jpg)
http://res.cloudinary.com/christekh/image/upload/w_700/l_text:Verdana_20_bold_underline:JOHNSONS%20PRESENTS,g_north,y_25,co_rgb:F9583C/l_text:Midnight-Valentine.ttf_80:CLUB%20NIGHT,co_rgb:ffffff/pexels-photo-341858_hx5cva.jpgWe chained another transformation to what we had before. This time, the l_text’s font style value is now Midnight-Valentine.ttf which is the public ID of the font we uploaded. We removed the g_north property, as well as the y property, so the overlay position stays at the default location, which is the center of the image. Let’s have some more fun adding the venue and date of the party:
![010](https://www.webdesignerdepot.com/cdn-origin/uploads/2017/07/010.jpg)
http://res.cloudinary.com/christekh/image/upload/w_700/l_text:Verdana_20_bold_underline:JOHNSONS%20PRESENT,g_north,y_25,co_rgb:F9583C/l_text:Midnight-Valentine.ttf_80:CLUB%20NIGHT,co_rgb:ffffff/l_text:Verdana_20:Venue:%20JOHNSONS%20PARTY%20CLUB,g_south,y_130,co_rgb:ffffff/l_text:Lato_18_bold:Date:%2008-01-2017,g_south,y_100,co_rgb:ffffff/pexels-photo-341858_hx5cva.jpg
Conclusion
The first image shown at the beginning of this article was designed in Sketch. The last image was built by composing parameters in a URL. You can imagine how powerful the latter is. Knowing the right properties in Cloudinary to use will enable you to start generating graphics dynamically without the help of a graphics designer. You can learn more about these properties from the Cloudinary docs. [-- This is an advertorial on behalf of Cloudinary --]Christian Nwamba
Cloudinary provides a comprehensive cloud-based image and video management solution. With offices in Israel, London and Sunnyvale, Calif., Cloudinary has quickly become the de facto solution used by web and mobile application developers at major companies around the world to streamline image and video management, and deliver an optimal end user experience. Among Cloudinary users are Answers.com, Conde Nast, Gawker, Gizmodo, TED, The Knot, Under Armour, Vogue, Wired and many others. For more information, visit www.cloudinary.com or follow on Twitter @cloudinary.
Read Next
15 Best New Fonts, July 2024
Welcome to our monthly roundup of the best fonts we’ve found online in the last four weeks. This month, there are fewer…
By Ben Moss
20 Best New Websites, July 2024
Welcome to July’s round up of websites to inspire you. This month’s collection ranges from the most stripped-back…
Top 7 WordPress Plugins for 2024: Enhance Your Site's Performance
WordPress is a hands-down favorite of website designers and developers. Renowned for its flexibility and ease of use,…
By WDD Staff
Exciting New Tools for Designers, July 2024
Welcome to this July’s collection of tools, gathered from around the web over the past month. We hope you’ll find…
3 Essential Design Trends, July 2024
Add some summer sizzle to your design projects with trendy website elements. Learn what's trending and how to use these…
15 Best New Fonts, June 2024
Welcome to our roundup of the best new fonts we’ve found online in the last month. This month, there are notably fewer…
By Ben Moss
20 Best New Websites, June 2024
Arranging content in an easily accessible way is the backbone of any user-friendly website. A good website will present…
Exciting New Tools for Designers, June 2024
In this month’s roundup of the best tools for web designers and developers, we’ll explore a range of new and noteworthy…
3 Essential Design Trends, June 2024
Summer is off to a fun start with some highly dramatic website design trends showing up in projects. Let's dive in!
15 Best New Fonts, May 2024
In this month’s edition, there are lots of historically-inspired typefaces, more of the growing trend for French…
By Ben Moss
How to Reduce The Carbon Footprint of Your Website
On average, a web page produces 4.61 grams of CO2 for every page view; for whole sites, that amounts to hundreds of KG…
By Simon Sterne
20 Best New Websites, May 2024
Welcome to May’s compilation of the best sites on the web. This month we’re focused on color for younger humans,…