> ## Documentation Index
> Fetch the complete documentation index at: https://cloudinary.com/documentation/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload images in Laravel (video tutorial)

## Overview

Learn how to upload images in a Laravel application using the [community-developed Cloudinary Laravel SDK](https://github.com/cloudinary-community/cloudinary-laravel/). This tutorial demonstrates how to use Laravel with Livewire to create a product form that uploads images to Cloudinary using the `storeOnCloudinary` method, then retrieves and displays those assets to users.

The Cloudinary Laravel SDK provides easy ways to abstract file uploads, giving you access to features like optimization, transformations, and AI analysis out of the box.

> **NOTE**: The Laravel SDK is a community-developed library. For more details, see the [community-developed libraries](community_sdks#laravel_package) 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
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=0 :sec=00 :player=cld} | As a web developer, handling media and assets is a crucial part of an application's infrastructure. Cloudinary provides an easy way to store images, videos, and other files, giving you features like image optimization, AI analysis, and generative fill out of the box. |

### Laravel Cloudinary SDK features
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=0 :sec=29 :player=cld} | The [community-developed Cloudinary Laravel SDK](https://github.com/cloudinary-community/cloudinary-laravel/) provides ways of abstracting how you upload files through Laravel into Cloudinary. It also gives you easy ways of using Laravel's facades to upload images and retrieve those files later. |

### The storeOnCloudinary method
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=0 :sec=52 :player=cld} | This tutorial focuses on the `storeOnCloudinary` method helper provided by the Laravel Cloudinary SDK. You'll use Laravel and Livewire to create a form that uploads a file to Cloudinary so you can later retrieve and display it on the page. |

### Setting up the product form
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=1 :sec=57 :player=cld} | Create a dashboard view with a product form that allows users to add a product name, description, price, and upload an image. Currently, the form stores images to a local public folder, but you'll connect it to Cloudinary instead. |

### Database structure
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=2 :sec=47 :player=cld} | The products table includes `image_url` and `image_public_id` columns. These fields store the Cloudinary URL and public ID, which you'll use to retrieve and display images with transformations later. |

### Uploading to Cloudinary
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=3 :sec=10 :player=cld} | Use the `storeOnCloudinary` method to upload files directly to Cloudinary. Specify a folder (like "products") to organize your assets. The SDK handles the upload process, making it easy to integrate Cloudinary into your Laravel application. |

### Retrieving image data from the SDK
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=3 :sec=26 :player=cld} | The Laravel Cloudinary SDK provides methods to retrieve the secure URL and [public ID](cloudinary_glossary#public_id) of uploaded images. Store these values in your database for later retrieval, allowing you to display optimized images to your users. |

### Testing the upload form
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=4 :sec=17 :player=cld} | Test the form by uploading an image. Notice the loading indicator while the image uploads to Cloudinary. Using Laravel Livewire, you can show a skeleton loader while waiting for the upload to complete, providing a smooth user experience. |

## Keep learning

> **READING**:
>
> * Learn more about the [community-developed Laravel SDK](https://github.com/cloudinary-community/cloudinary-laravel/) and its features.

> * Explore our [community-developed libraries](community_sdks) for other frameworks.

> * Explore other ways to [upload assets](dam_upload_store_assets) programmatically.

> * Watch more [Dev Hints videos](https://www.youtube.com/playlist?list=PL8dVGjLA2oMpaTbvoKCaRNBMQzBUIv7N8) on the [Cloudinary YouTube channel](https://www.youtube.com/cloudinary).

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

  
  
  
    Optimize Images in Laravel
    Optimize images in Laravel with Cloudinary 
  

  
  
  
    Upload Images in PHP
    Upload images to Cloudinary using the PHP SDK 
  

  
  
  
    Configure the PHP SDK
    Install and configure the Cloudinary PHP SDK 
  

&nbsp;

&nbsp;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.
&nbsp;