Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML Responsive Images Art Direction with the Picture Element The Picture Element

Stefan Cutajar
Stefan Cutajar
7,747 Points

Browser dont show 500px image

when i resize the browser it fails to less than 500px it dosent show the square image laarge but when i go a bit smaller theres no problem showing the square medium image I have the dev tools open and the clear cache box ticked but still the problem persists. is this the normal behvior of the browser?

  <picture>
        <source
          media="(orientation: landscape)"
          srcset="img/banner-large.jpg  2048w,
                  img/banner-medium.jpg 1400w,
                  img/banner-small.jpg  800w"
          />
        <source
          srcset="img/banner-square-large.jpg  1000w,
                  img/banner-square-medium.jpg 800w"

          />
        <img
          src="img/banner-medium.jpg"
          alt="Photograph of Nick Pettit in front of trees."
          class="banner-image"
          />
      </picture>