Sharp Kernel replacement?

Is there anyway directus can make an ENV variable to change the kernel that sharp uses ?
because using the default in directus always give fuzzy images back ( this is an issue in sharp with the default kernel )

Original jpg 100% → sharp 100% = Pixelated same image

so that we can do something like

sharp(inputBuffer)
  .resize({
    width: desiredWidth,         
    fit: 'cover',                
    kernel: sharp.kernel.cubic,  
    withoutEnlargement: true,    
  })
  .jpeg({
    quality: 90,                
    chromaSubsampling: '4:4:4',   
    progressive: true,           
    optimizeCoding: true,     
  })
  .toBuffer();
1 Like

There’s currently (as of v11.8.0) no way to change the kernel, but that’s a great idea!