Thumb quality question

In my templates I have images that use the thumb to reduce the quality and make the image file sizes smaller

<img src="<?= $page->file('xyz.jpg')->thumb(['quality' => 80])->url() ?>">

This generates smaller images in the Media folder with “-q80” added to the end of the file name.

But when I remove “[‘quality’ => 80]” from the templates and set the quality of thumbs in the config file the images are not modified. Same size images and file names.

Config file:

<?php

return [
	'debug' => false,


	'thumbs' => [
		'quality' => 80,
	],
];

Template

<img src="<?= $page->file('xyz.jpg')->thumb()->url() ?>">

How come this isn’t working?

Oh hang on, to override the default presets do I need to name the default preset in the config file:

<?php

return [
	'debug' => false,


	'thumbs' => [
		'presets' => [
			'default' => ['quality' => 80]
		]
	]
];

Then in the template

<img src="<?= $page->file('xyz.jpg')->thumb()->url() ?>">

That appears to work, but ChatGPT says it won’t work, which is weird??