How to resize uploaded images to custom sizes

I also followed the docs with no success.
Got it working using an override as described here:

Original file: https://github.com/strapi/strapi/blob/35aafde2288e6858a9b1757cf2555a8561421140/packages/strapi-plugin-upload/services/image-manipulation.js

Change the path to utlis to your node_modules like:

const {
  bytesToKbytes
} = require('strapi-plugin-upload/utils/file');

and update breakpoints.

Is this how we should do it? Why is the documented solution not working? Are we missing something?