When images are made to fill the full width of the screen in media queries, does it do it with the max-width of the media feature or with the original width of the container?

On the 13th item of this project, when the media query was applied for small screens, the images became wide to fill the width of the screen.

Was the image styled to fill the width of the media feature of the media query as in,

@media only screen and (max-width: 470px){
      .gallery img {
          width: 100%;
         margin: 0;
    }
}

OR

Did it fill the original width of the container which is 960px?