Control your asset optimization settings from netlify.toml

Hi everyone,

We are happy to announce that from today, you’ll also be able to control post processing settings directly from your code as part of your netlify.toml file, keeping your code and configuration all in the same place, and under the same version control.

You can learn more about the new settings in our netlify.toml reference docs.

4 Likes

I’ve tried disabling image compression post processing, but it seems to ignore my configuration file settings.

[context.deploy-preview.processing]
  skip_processing = false

[context.deploy-preview.processing.images]
  compress = false

Hi @simpixelated,

Could you share your site name?

Sure, it’s “simpixelated”. I have all of the processing settings enabled in the UI for my deploy settings, but the file-based config is not overriding it with the above syntax, as I would expect.

Interesting. Could you try disabling entire asset optimisation with skip_processing = true to see if it’s working at all?

Yes, I tried that and it didn’t work either. I canceled the deploy after I saw it was still trying to optimize images: Netlify App

The images are being optimised because you’re using a plugin specifically designed to do that. You need to remove it.

1 Like

OMG thank you! I was confusing the “asset optimization” in build settings with the “image-optim” plugin.

1 Like