Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

StartTutorial.com:
Dynamic image resizing via URI with Glide and Slim
Feb 02, 2017 @ 18:45:58

The Star Tutorial site has a new article posted showing you how to create a system based on Glide and the Slim framework to dynamically resize images with a few simple URLs.

If you have ever used WordPress.com backend. You will notice its image resizing works by appending a dimension string at the end of the URL.

In this tutorial, we will show you how to do that for your own project. At the end of this tutorial, you will have an image resizing server that is able to give you specific dimension upon request.

The tutorial starts with a basic introduction to the Glide image manipulation tool and how to get a Slim installation up and running. They then help you install the league/glide-slim package to help link the two. With those in place, they show you how to build out the resizing code using the ServerFactory handling to grab the image, passing in the URL parameters to tell Glide how to manipulate the image.

tagged: tutorial dynamic image resize uri glide slim

Link: https://www.startutorial.com/articles/view/dynamic-image-resizing-via-uri-with-glide-and-slim

SitePoint PHP Blog:
Glide: Easy Dynamic on-Demand Image Resizing
Mar 03, 2016 @ 16:52:59

On the SitePoint PHP blog editor Bruno Skvorc has posted a tutorial showing you how to use Glide, an image manipulation library that's a part of the League of Extraordinary Packages.

Glide is an image processing library built on top of Intervention. Its purpose is to facilitate on-demand image processing. That’s a fancy way of saying it creates images as they’re requested if they don’t exist.

He gives the example of the need to manipulate the image based on the user's device - like desktop versus mobile clients. He shows how to get the library installed (via Composer) and how to configure it with cache and source directories. He then integrates the library into a "no framework"-based application, passing the missing image request to the "image" controller for handling. However a basic implementation like this leaves it open to exploit. He shows how to restrict the allowed sizes with an allowedWidths data set. He ends the article with a look at image saving and caching with the possibility of writing the resulting file to the local drive (caching) if re-requested later.

tagged: glide image manipulation library theleague ondemand tutorial

Link: http://www.sitepoint.com/easy-dynamic-on-demand-image-resizing-with-glide/

Laravel News:
Easy Image Processing in Laravel with Glide
Jan 30, 2015 @ 16:06:41

On the Laravel News site there's a new post sharing a video tutorial of how to use the Glide image handling library with your Laravel-based application.

Glide is a new package by Jonathan Reinink which is an on-demand image manipulation library. In this video he shows you how to set it up and the basic usage in Laravel 5.

In the tutorial Jonathan walks you through an introduction to the library and how it wraps around the Intervention image handling. He creates a basic application that, when an image endpoint is called, output the image with any given configuration options (like height and width). Glide is one of many packages making up The PHP League.

tagged: laravel image processing glide library thephpleague screencast video

Link: https://laravel-news.com/2015/01/using-glide-laravel/


Trending Topics: