:host {
  /**
   * @prop --dimension-aspect-ratio: The image's aspect ratio.
  */
  --dimension-aspect-ratio: auto;
  display: inline-block;
}

img {
  aspect-ratio: var(--dimension-aspect-ratio);
  display: block;
  height: auto;
  max-width: 100%;
}