Specify Image Dimensions

I am trying to find out the best way to insert images on content-pages for the responsive theme. When i place an image on a page using the WYSIWYG-editor, it usually generates a code like this:


… but then the image is not responsive. I have tried changing it to something like this to make it responsive:


… and it works. The image is responsive. But this is apparently not the correct way to do it as GTmetrix tells me to specify image dimensions. Anyone know how an image HTML-code should look like, so that it is both responsive and also includes the original dimensions?


I am having similar issues with images in responsive themes.