Remembered I saw this when I was looking for an answer, so for future reference here’s the way I fixed it.
Navigate to the Packages folder (Preferences > Browse Packages)
Go into HTML folder and open the file named ‘html_completions.py’
Hit CTRL+F (cmd+F for Mac), type ‘img’. You’ll find a small list of tags like the below:
code,
(“embed\tTag”, “embed>”),
(“hr\tTag”, “hr>”),
(“img\tTag”, “img src=”$1">"),
(“input\tTag”, “input>”),
(“meta\tTag”, “meta>”),
(“param\tTag”, “param name=”$1" value="$2">"),[/code]
All of these need to have the closing slash added in. Here’s mine to copy and paste (be careful what you’re replacing! Don’t go breaking anything!):
code,
(“embed\tTag”, “embed/>”),
(“hr\tTag”, “hr/>”),
(“img\tTag”, “img src=”$1"/>"),
(“input\tTag”, “input/>”),
(“meta\tTag”, “meta/>”),
(“param\tTag”, “param name=”$1" value="$2"/>"),[/code]
Now with autocomplete, each tag should include the closing slash. To also include the alt attribute inside the img tag, replace the line with following:
("img\tTag", "img src=\"$1\" alt=\"$2\" />"),
Hope that helps!