Update image sizes

A common requirement is to provide an initial width/height for an image. We do this so that the browser knows how much space to reserve for the image. This keeps the page from jumping around before and after the image is downloaded from the server.

You can use Emmet to automatically update image sizes.

  • Put your cursor in the img tag in the "index.html" page

  • Open the Command Palette (Cmd/Ctrl + Shift + P)

  • Select "Emmet: Update Image Size"

Note that this also works for remote images - those referenced by URL. It also works for images in CSS - like the background image you specified.