def find_by_id(id)
marker = 'X-Image-Meta-'
property_marker = 'X-Image-Meta-Property-'
headers = service.get_image_by_id(id).headers.select { |h, _| h.start_with?(marker) }
custom_properties, params = headers.partition do |k, _|
k.start_with?(property_marker)
end.map { |p| Hash[p] }
params = remove_prefix_and_convert_type(params, marker)
custom_properties = remove_prefix_and_convert_type(custom_properties, property_marker)
params['properties'] = custom_properties
new(params)
rescue Fog::Image::OpenStack::NotFound
nil
end