[4.x] Support additional CP thumbnail presets #8811
Merged
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.
I'm working on a project with a custom assets fieldtype that displays the preview image larger than 400px, so the default
small
thumbnail looks a bit fuzzy. The only alternative currently is to display the original file, but that could be huge.This PR allows you to add extra CP thumbnail presets, for use by custom CP extensions/addons.
It does allow you to override the default
small
preset as well, as I couldn't really see any reason to prevent that. That could be useful if you just needed a slightly larger thumbnail and don't want to double up.The config could make sense in either
assets
orcp
. I went forcp
but can change that if necessary.