Tribute page responsive and center

<%= @topic_view.topic.title %>
<%= @topic_view.topic.average_rating %> <%= @topic_view.topic.posts.count { |p| !!p.custom_fields['rating'] } %>

Hi guys! Im sorry to bother but i have been researching and going back to tutorials but cant seem to find the answer. I am doing my tribute page and I´m stuck in making the image responsive and centering it. When I add the display: block; to the img{} it uncenters it and and i fail the other test even though I used text-align: center in the body{}. When I remove the display: block the image recenters but I fail de responsive test. Is the display:block; line needed to make an image responsive or is simply the max-width: 100% sufficient? What can i do? Thank you all!
Here´s my code:

body{
  text-align: center;
}

h1{
 font-family: sans-serif; 
  font-size: 50px;
}

img{
  max-width: 100%;
  display: block;
  height: auto;
  text-align: center;
  
}

#img-caption{
  font-size: 10px;
}