Programmable Media

Optimize images in Laravel (video tutorial)

Last updated: Mar-28-2025

Overview

This tutorial demonstrates how to optimize images in a Laravel application using Cloudinary, covering key aspects such as performance improvement, uploading images, transforming them, and adjusting their format and quality for better user experience and SEO.

Video tutorial


Tutorial contents

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

Importance of performance

Jump to this spot in the video  0:00 Performance is a critical factor in delivering a good user experience and optimizing your website for SEO. Slow-loading images can negatively impact conversion rates and overall performance.

Using Cloudinary with Laravel

Jump to this spot in the video  0:13 Learn how Cloudinary can be used in Laravel applications to optimize images. The tutorial introduces the Cloudinary Laravel package, which simplifies image transformations and optimization through predefined functions.

Uploading images to Cloudinary

Jump to this spot in the video  0:51 Upload images to Cloudinary for efficient storage and management. A custom PHP route is used to upload images and retrieve their unique Cloudinary IDs for further transformations and display.

Optimizing images

Jump to this spot in the video  1:39 Replace static image delivery methods with the Cloudinary Blade component or helper functions to enable on-the-fly transformations. Optimize images for performance by adjusting parameters like resolution, compression, and format.

Image format and quality

Jump to this spot in the video  3:40 Explore automatic transformations like converting images to modern formats (e.g., AVIF or WebP) and adjusting quality settings. Learn how to shrink image file sizes significantly without sacrificing visual quality using Cloudinary’s automatic quality feature.

Changing image size

Jump to this spot in the video  5:28 Adjust image dimensions to suit responsive designs or specific display requirements. Ensure that rendered sizes match the intrinsic sizes to improve performance while maintaining image clarity.

Conclusion and next steps

Jump to this spot in the video  7:21 Review the transformations applied and confirm their impact on performance and quality. Explore additional features of Cloudinary for more advanced use cases, such as video optimization and dynamic media delivery.

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!