# Sharp Kernel replacement?

**URL:** https://community.directus.com/t/sharp-kernel-replacement/386
**Category:** Help
**Created:** [May 22, 2025, 8:17am UTC](https://community.directus.com/t/sharp-kernel-replacement/386 "2025-05-22T08:17:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Nossie](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/nossie/32/353_2.png) [@Nossie](https://community.directus.com/u/Nossie)
#### Post date: [May 22, 2025, 8:17am UTC](https://community.directus.com/t/sharp-kernel-replacement/386/1 "2025-05-22T08:17:33Z")

</div>

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

```auto
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();

```

---

<div class="post-metadata">

### Author: ![rijkvanzanten](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/rijkvanzanten/32/31_2.png) [@rijkvanzanten](https://community.directus.com/u/rijkvanzanten)
#### Post date: [June 4, 2025, 10:15pm UTC](https://community.directus.com/t/sharp-kernel-replacement/386/2 "2025-06-04T22:15:39Z")

</div>

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