Image & Video APIs

Configure the Laravel SDK (video tutorial)

Last updated: Mar-10-2026

Overview

Learn how to install and configure the community-developed Cloudinary Laravel SDK in your Laravel application. This tutorial walks through the complete setup process, from installing the SDK via Composer to configuring your environment variables and displaying optimized media using Cloudinary's powerful features.

Whether you're building a product catalog, media library, or any application that handles images and videos, this tutorial shows you how to quickly integrate Cloudinary into your Laravel workflow with just a few commands.

Note
The Laravel SDK is a community-developed library. For more details, see the community-developed libraries page.

Video tutorial


This video is brought to you by Cloudinary's video player - embed your own!
Use the controls to set the playback speed, navigate to chapters of interest and select subtitles in your preferred language.

Tutorial contents

This tutorial presents the following topics. Click a timestamp to jump to that part of the video.

Introduction to Cloudinary features

Jump to this spot in the video  0:00 Discover how Cloudinary makes it easy to boost performance by optimizing your videos and images, provides tools to manage your dynamic content library, and gives you the ability to use AI for features like generative fill for images.

Installing the Cloudinary Laravel SDK

Jump to this spot in the video  1:03 Install the Cloudinary Laravel SDK using Composer with the command composer require cloudinary-labs/cloudinary-laravel. This SDK provides an expressive API to easily work with Cloudinary and your media files in Laravel applications. For more information, see the Cloudinary Laravel SDK on GitHub.

Configuring the environment variable

Jump to this spot in the video  1:18 For Laravel 5.5 and higher, add the CLOUDINARY_URL environment variable to your .env file. You can find this URL on the API Keys page in Console Settings. Copy the full URL, paste it into your .env file, then replace the placeholders with your actual API key and secret to connect your application to your Cloudinary account.

Displaying images from Cloudinary

Jump to this spot in the video  1:48 Use the cld-image Blade component provided by the Laravel SDK to display images from your Cloudinary media library. Replace the standard <img> tag with <x-cld-image> and use the public-id attribute instead of src. This gives you access to all Cloudinary's optimization and transformation features right within your Laravel views.

Applying image transformations

Jump to this spot in the video  2:31 Apply transformations to your images using Cloudinary's effect attributes directly in the Blade component. For example, add effect="grayscale" or effect="cartoonify" to instantly transform your images. The Laravel SDK makes it easy to use any Cloudinary transformation without writing complex URLs. Learn more about available effects in the image transformation documentation.

Embedding videos with Cloudinary video player

Jump to this spot in the video  2:54 Embed and play videos using the Cloudinary video player, which provides optimized streaming and a rich viewing experience. The video player can be easily integrated into your Laravel application for smooth video playback. For more information, see the Cloudinary video player documentation.

Keep learning

Related topics

If you like this, you might also like...

 

Cloudinary Academy

 

Check out the Cloudinary Academy for free self-paced Cloudinary courses on a variety of developer or DAM topics, or register for formal instructor-led courses, either virtual or on-site.

 

✔️ Feedback sent!

Rate this page:

one star two stars three stars four stars five stars