img {
    aspect-ratio: attr(width) / attr(height);
}
