Disable all resizing and compression

How do you successfully disable all image compression and resizing?

I would like WordPress to use the image exactly as it is uploaded. same pixel dimentions, same quality.

I have gone down the route of adding to functions.php multiple strings that change the thresholds and the quality like…

No joy.

There are multiple threads on this topic across the net, lots of similar suggestions, none of them work/work with the recent WordPress release.

Has anyone been able to achieve this?