What element is used in the art-direction-based selection, when talking about image responsiveness? In what case art-direction-based selection should be used?

We use the picture (specifies the number of image options) and source (specifies alternate image sources) elements for achieving art-direction-based selection:

  <source media="(min-width: 1024px)" srcset="logo-768.png 768w, logo-768-1.5x.png 1.5x">
  <source media="(min-width: 760px)" srcset="logo-480.png, logo-480-2x.png 2x">
  <img src="logo-320.png" alt="logo">

Each source element contains a media and a srcset attribute (and a sizes attribute as well). The media attribute supplies a media query for checking the current browsing conditions.

The art-direction-based selection should be used when we want to crop an image in order to enhance a specific part of it, displaying it in more detail. This type of selection should also be used to provide different images more suitable to the layout of the device (vertical, horizontal).

The img element acts as a "placeholder" for the other images and it is also the fallback image in case the other images fail to be understood by the browser.