Custom upload image format

Is there a way to define exact custom image upload formats?

I know about the overwriting function for breakpoints which works for me:

config/plugins.js

module.exports = ({env}) => ({
  upload: {
    config: {
      breakpoints: {
        xlarge: 1920,
        large: 1000,
        medium: 750,
        small: 500,
        xsmall: 64
      }
    }
  }
});

However, I am still missing a way to exactly define the formats e.g. (width: 500, height 250) and not only one dimension.

How can I do it?