Skip to main content
Noble Desktop/1 min read

Update Image Size in Sublime Text

Emmet's Update Image Size

Place Cursor in <img> Tag

Click anywhere inside an existing img tag with a src attribute.

Open Command Palette

Cmd-Shift-P (Mac) or Ctrl-Shift-P (Windows).

Find Emmet: Update Image Size

Sublime calls Emmet, which reads the actual image dimensions.

Width & Height Auto-Updated

The width and height attributes update to match the real image.

Master Web Development at Noble Desktop

Noble Desktop's Full-Stack Web Development Certificate covers HTML, CSS, JavaScript, and the modern web stack.

Sublime Text with Emmet allows you to automatically update width and height attributes on img tags. Place the cursor inside an img tag and hit Ctrl–Shift–I (Mac) or Ctrl–U (Windows).

Ct update image size

Note: This keystroke requires Emmet to be installed in Sublime Text. For instructions on how to install Emmet, download our Sublime Text Enhancements Installation Guide.

Learn more Sublime Text Coding Tips. These coding tips are covered in our hands-on coding classes and bootcamps in NYC.