It sounds like you want to do the equivalent of CSS cover property. I’ve got an example here that works with a square image: Responsive UI for all device in PlayCanvas
If your image is non-square, you will have to adapt the code.
If the game is only going to be portrait, what oxters168 suggested will work too.