for measuring in an image/photo, you can do it now fairly automatically, but you do still need to measure one item, you might want to check out this app below:
the general answer is, Yes and no, if you add in enough information besides the EXIF info, then it can be done, if you don't add enough info in then no, that info is an extremely complex calculation of the perspective of the object, but then also using that to work back to the format and angle of the photo frame, then an exact measurement to the person's eye or frame center, then knowledge of the exact ground surface elevations between you and the object. and even more calculations beyond that.
This app below does all of that, but with estimates of height, ground etc.. it can basically create an “As-Built” drawing from a photo automatically. Both on interior and exterior walls or surfaces, including just furniture surfaces. It even puts the dimensions on for you, it can estimate the scale of the wall or object you’ve taken a photo of so you have something to work with, then once you correct one of the dimensions (as mentioned before, it is only using estimates), all of the dimensions become correct (for that surface plane you are working on). Then you can add more dimensions, and move around existing dimensions too it can even measure areas and perimeters right on that photo.