The quality and size of a digital image are not measured with the same dimensions as paper or film, but by the resolution. Limiting ourselves to a general popular definition easy to understand, we can say that the resolution of a photo is the total number or pixels that make it up. The unit of measure is the megapixel, 1 million dots.

5MP - Excellent resolution for viewing and sharing of pictures on cell phones, computers and TVs.
As a reference, here are some examples of resolutions in megapixels:
Google Pixel: 2.07
iPhone X: 2.74
Samsung Galaxy Note: 1.02
Microsoft Surface Pro: 4.99
Televisione HD: 2.07
Televisione 4K: 8.85

20MP - Resolution barely sufficient for a quality 4x6 print. A modern printer, available to the public or professional type, can print different quality levels, generally defined as dpi (dots per inch). Let's see what quality and size we can print a 20MP image:
96 dpi (quotidiano): 150cm x 95cm
150 dpi (rivista patinata): 96cm x 61cm
240 dpi (stampante inkjet): 60cm x 38cm
600 dpi (stampante laser): 24cm x 15cm
1200 dpi (stampa fotografica): 12cm x 7cm