title: Image max height and max width while preserving aspect ratio
body: <p>Is it possible to give max-height and max-width to an image while preserving aspect ratio without using js?</p>
  <p>For example,
  I want an image to be with a height of 38px and the width auto.
  If the width is higher than 200px, I want the width to be 200px and the height auto.</p>
  <p>If it's not possible without js, does anyone have an idea how to do it with js and without resizing the image after it's already loaded?</p>