>>”All digital photos have metadata.”
Nope, not all digital photos have metadata<<
Well, they do but it is about the physical attributes of the contents (size, format, date taken, MAYBE GPS coordinates). not the content itself.
Metadata are data which describe data.
Ok, fair enough.
I've written code that saves pure bitmaps with no metadata. Just pure bitmaps with no encoding or compression. Some of that software is still in commercial use for dedicated hardware.
As soon as you introduce variable image dimensions/resolutions, or compression of some sort, then you need metadata to describe the size of the bitmap and/or the encoding technique in order to render the image in a frame buffer.
All popular image formats use some sort of compression, usually lossy. So, yep, almost all contain metadata of some sort. The technical metadata is required as part of the image. Contextual metadata (date, GPS, camera ID, thumbnail, etc) is not.