Gallery syntax claims that widths/heights should be written as <gallery widths="150px", but the code shows the attribute is just cast to an integer, so "150em", "150%" and "150" would all give the same result.
Image syntax also requires "px" but fails to parse if "px" is omitted. We should either update the documentation to recommend no units, or only parse when "px" is present (if we want to support more units in the future).