[5.x] Driver based image manipulation with render tag #10204
+2,477
−344
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Warning
This is very much a work in progress.
Currently, all image manipulation is fairly tightly integrated with Glide.
This PR introduces the concept of driver-based image manipulation. Glide will continue to ship as the default, but it will become easier to swap it out for other services such as Imgix, Cloudinary, Cloudflare Images, etc.
This will also introduce a new
render
tag which will be essentially identical to theglide
tag but allow you to use any driver. For example, if you were to use the imgix driver, you'd be able to use their face detection and background removal features:This is aimed to be introduced in the 5.x line at some point, so everything should be backwards compatible. You will be able to opt into it by either using the new
render
tag, or by customizing your image manipulation config file.?p=whatever
as a param, it would unpack them and do?w=100&h=100&etc=
width
=>w
)fit="crop_focal"
param only works for glide. Needs to be smarter. e.g. glide wants?fit=crop-1-1-1
but imgix wants something like?fit=crop&crop=focalpoint&fp-x=1&fp-y=1&fp-z=1