Laravel Clyde — image uploads, resizing & manipulations for Laravel

It's very common for web applications to deal with image uploads, image resizing and other manipulations. Arguably the best approach to the problem (apart from offloading the task to a service like imgix) is to store the uploads in the cloud and resize and manipulate the images on the fly. This approach offers a lot of flexibility to resize images to any size at any time and it can still work reasonably fast if the resized images get cached.

The good news is this is a problem already solved by glide — wonderfully easy on-demand image manipulation library with an HTTP based API.

Since glide is a universal library that works in any PHP project, all that's really needed to start using it with Laravel is a little bit of glue code. Laravel Clyde removes all complexity from setting up glide and using it with Laravel.

When using Laravel Clyde I prefer to upload images to S3 and store cached files on local filesystem.

// config/clyde.php
return [
  'source' => 's3',
  'cache' => 'local',

For more detailed documentation see the README.

UPDATE, 2018:

Using laravel-clyde or glide is convenient, but not exactly performant. You've been warned, proceed with caution. ⚠️

Did you like this post?
Previous post
React is intriguing. It has a much smaller footprint than a full blown Javascript framework like Angular, it’s component based and relies on one-way data flow. The JSX syntax is very different from what I’m used to, but after giving it a try having the markup and related Javascript code all in one place has some advantages to it.
Next post

I've been recently using Codeception and really appreciate what it can do. I see Codeception as PHPUnit on steroids. What's nice about Codeception is that existing PHPUnit tests are compatible with it, so not all work is lost for people moving from PHPUnit to Codeception.