Distorted Images In WordPress

Have you found that media library images added to your WordPress pages and posts are distorted? This can happen if you add an image from the media library using a Gutenberg block, and then resize your screen. The video below shows you what I mean.

The problem can be addressed with two lines of CSS. I use Microthemer to add CSS, but you can use your CSS editor of choice. The CSS is as follows :