function CardImg(props) {
  const {
    className,
    cssModule,
    top,
    bottom,
    tag: Tag = 'img',
    ...attributes
  } = props;

  let cardImgClassName = 'card-img';
  if (top) {
    cardImgClassName = 'card-img-top';
  }
  if (bottom) {
    cardImgClassName = 'card-img-bottom';
  }

  const classes = mapToCssModules(
    classNames(className, cardImgClassName),
    cssModule,
  );

  return <Tag {...attributes} className={classes} />;
}
Add `top` prop if image is at top of card