Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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>