feat(imageresizer): add trim options (#2073)
* freat(imageresizer): add trim options * fix(imageresizer): check for trimOptions config key * feat: add trimOptions to original file upload, add test config * chore: adjust sharp file ref --------- Co-authored-by: Steven Thompson <steven@teamtailor.com> Co-authored-by: Elliot DeNolf <denolfe@gmail.com>
This commit is contained in:
@@ -135,6 +135,39 @@ export default buildConfig({
|
||||
},
|
||||
fields: [],
|
||||
},
|
||||
{
|
||||
slug: 'media-trim',
|
||||
upload: {
|
||||
staticURL: '/media-trim',
|
||||
staticDir: './media-trim',
|
||||
mimeTypes: ['image/png', 'image/jpg', 'image/jpeg'],
|
||||
trimOptions: 0,
|
||||
imageSizes: [
|
||||
{
|
||||
name: 'trimNumber',
|
||||
width: 1024,
|
||||
height: undefined,
|
||||
trimOptions: 0,
|
||||
},
|
||||
{
|
||||
name: 'trimString',
|
||||
width: 1024,
|
||||
height: undefined,
|
||||
trimOptions: 0,
|
||||
},
|
||||
{
|
||||
name: 'trimOptions',
|
||||
width: 1024,
|
||||
height: undefined,
|
||||
trimOptions: {
|
||||
background: '#000000',
|
||||
threshold: 50,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
fields: [],
|
||||
},
|
||||
{
|
||||
slug: 'unstored-media',
|
||||
upload: {
|
||||
|
||||
Reference in New Issue
Block a user