The width
of the element is set on a class ("w180") instead of using a
style attribute. Wikipedia offers thumbnail images in six different
sizes (120px, 150px, 180px, 200px, 250px, 300px) and this number is
low enough to use classes. The main benefit of using classes is that
alternative style sheets can change the presentation, e.g., for
printing purposes. The style attribute, on the other hand, can never
be overridden.
Actually, you can set the width to any value you wish in the input
document, which would cause problems with your suggestion.
([[File:Example.png|123px|thumb|Some text.]] will always display at
123px wide, no matter what preferences are used).
Right. In this case, using a style attribute would probably be the
only viable solution. But this is rare, no? If we can eliminate 99% of
style attributes, I'm happy. Is there any way to count those that
specify exact widths?