Thanks for checking things up.
It seems you found the reason why RPI3 is handling the file with no problem, it uses the the GPU (and its memory) while RPI4 current code uses software and the RAM , thats why it needs much more.
As for sample images , you are right the the pictures that wont work are shot with professional camera and are about 60mpx.
I cant upload them (too personal, so i created "dummy" jpg and uploaded them to the previous shared link (https://drive.google.com/drive/folders/12susyfic64oqjida6va02vb6b3rj3vel)
They are called 35mpx.jpg , which is the smallest that worked with for me with gpu_mem=128.
The other one is 60mpx.jpg which is similar to the "real" one i have , and of course it doesn't work (might not work on 2gb also )
The RPI3 indeed works hard and it takes about 5-6 seconds to load the 60mpx.jpg file , but it does show it.
My worries is that the software decode is buggy (since it not used on other RPI's) , since i got occasional crash/freeze on library scans , which don't normally use big images.
Please let me know if you need anything else.