You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The development of version 1.0 is currently in ongoing in the branch v1.
Here are the new features:
Sources
The main difference between v1 and prior versions is the support of multiple sources. It make it easy to pull images from a laravel filesystem, or local filesystem or any remote url. You can take a look at the configuration file for a better idea: https://github.com/Folkloreatelier/laravel-image/blob/v1/src/config/image.php.
Basically, you will be able to use the facade on any source, for example:
Filters
Filters has been moved to classes and are now declared in the configuration file. It still support closure and array of other filters.
Routes
You can define multiple routes with lots of options. Here is an example of the configuration for the default route:
'routes' => [
'default' => [
// The path of the route. {pattern} will be replaced by the url pattern// for this route according to the url format.'route' => '{pattern}',
// A domain that will be used by the route'domain' => null,
// Any middleware you want ot add on the route.'middleware' => [],
// The name of the source to get the image. If it is set to null,// it will get use the default source.'source' => null,
// Allow to specify a size as filter'allow_size' => true,
// Allow to specify filters in url. You can also set this to// an array of specific filters to restrict this route to those filters.// Example: ["negative"]'allow_filters' => true,
// Disallow some filters. Can be set to an array of filters.'disallow_filters' => false,
// Any url options you want to override.'url' => [],
// You can specify base filters that will be applied to any image// on this route.'filters' => [
'width' => 100
],
// Expires header in seconds'expires' => 3600 * 24 * 31,
// Any headers you want to add on the image'headers' => [],
// Cache the file on local machine'cache' => true,
// The path where the images are stored. It is defined to public path,// so the files would be statically served on next request.'cache_path' => public_path()
]
]
URL
The generation of URL is easier and more configurable. You can define a general format that will apply to each routes or override it on each route.
Here is the general config:
'url' => [
// The format of the url that will be generated. The {filters} placeholder// will be replace by the filters according to the filters_format.'format' => '{dirname}/{basename}{filters}.{extension}',
// The format of the filters that will replace {filters} in the// url format below. The {filter} placeholder will be replace by// each filter according to the filter_format and joined// by the filter_separator.'filters_format' => '-image({filter})',
// The format of a filter.'filter_format' => '{key}({value})',
// The separator for each filter'filter_separator' => '-'
],
These are the remaining steps before release:
Add a source based on url
Javascript helper
Unit tests
Documentation
The text was updated successfully, but these errors were encountered:
planning on starting to use this tomorrow :) very exciting stuff! How's it going with the v1 branch? I see a commit in the last 30 days which always turns me on ;-)
btw I see that the docs only mention compatibility with laravel 5.2
I'm on 5.4, did you notice any breaking changes or not?
Any plans to continue supporting this library?
It's really good and I'd like to use it but I don't want to implement abandoned package into my project.
The development of version 1.0 is currently in ongoing in the branch v1.
Here are the new features:
Sources
The main difference between v1 and prior versions is the support of multiple sources. It make it easy to pull images from a laravel filesystem, or local filesystem or any remote url. You can take a look at the configuration file for a better idea: https://github.com/Folkloreatelier/laravel-image/blob/v1/src/config/image.php.
Basically, you will be able to use the facade on any source, for example:
Filters
Filters has been moved to classes and are now declared in the configuration file. It still support closure and array of other filters.
Routes
You can define multiple routes with lots of options. Here is an example of the configuration for the default route:
URL
The generation of URL is easier and more configurable. You can define a general format that will apply to each routes or override it on each route.
Here is the general config:
These are the remaining steps before release:
The text was updated successfully, but these errors were encountered: