This is the documentation for v6 but the latest version is v11 . You can switch versions in the menu at the top. Check your current version with the following command:

composer show spatie/laravel-medialibrary

Optimizing converted images