feat(server): separate quality for thumbnail and preview images #13006
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.
Description
It can be desirable to set the target quality differently between thumbnails and previews. Some admins might want to increase preview quality, but without making thumbnails unnecessarily larger. Others who mainly view the original image may wish to lower preview quality to save space.
This PR changes the config to have separate quality entries for thumbnails and previews. It also restructures the image settings to reflect the common settings between thumbnails and previews.
This is not a breaking change per se, but admins who set custom image settings in their config file will use the defaults until their config file is corrected. Admins who use the database via the admin UI are migrated over to the new config structure.
The image settings in the admin UI are now grouped by preview and thumbnail. I opted to set
isOpen
true for these accordions so they're expanded when first viewing without extra clicks.Fixes #12886
How Has This Been Tested?
Tested by setting an extremely low quality for one output and an extremely high quality for another, verifying that refreshing thumbnails for an asset finished successfully, and that the two images are of very different quality.