How can I get the same pixelation factor on images of different sizes

I’m currently working on a web game where a pixelated image will be presented to the player and will become neater over time, the goal being to guess the character hidden behind the image before the time runs out.

I’ve managed to deal with everything to do with the pixelation of the image, but I’m stuck on one problem. In my game, there’s going to be a different image every day, and not all the images available are the same size.

For example, today we’ll have image A which is a certain size (let’s say 750*750) and let’s say the pixelation factor that works best is 50.

Tomorrow, for an image B that’s 1920*1080, the same pixelation factor won’t be enough to pixelate the image in the same way as image A. It’ll be less pixelated and it’ll be too easy to identify the hidden character.

Here’s an exemple :

Image A (500*278):

BB-8 from Star Wars

The pixelation factor that works the best here is 35

Image B (2031*2708) with the same pixelation factor :

Obi-Wan Kenobi from Star Wars

That’s why the factor can’t be a constant value and must be calculated according to the size of the images. Unfortunately, I can’t think of a formula that will work regardless of image size, or even know if it’s possible.

Another solution I’ve considered is to take all the images in my game and put them in the same format, but that would take me a long time. That’s why I’m asking you in the first place.

I hope I’ve made myself clear and that you can help me. Thanks !