Read metadata from image before validation