In order to compensate for different resolutions etc, you need initialize your game at the start based on lots of different variables. You can look up information such as screen width, orientation, desktop vs mobile etc and then adjust your artwork at the start of the game so that when it plays it utilizes different scales or speeds or artwork.
So for example, you could change the paralaxing speeds of your backgrounds depending on if you are on mobile or on desktop.
At the beginning of the game check the type of device its running on, then adjust accordingly.
You could have completely different artwork for small screens vs large ones. depends how complicated you want to get. The easiest solution is to design your game with these restraints in mind. Place the information you need on screen in clever places, or take out un nessary things if you are playing on a tiny screen for example.