Or hide the if
s in a refactored-out method like get_image_resource_path
:
Here I assign the path returned from this method to both small and large icon (as thomthom and the DevCamp presentations recommend now).
Also a good example (regarding the version/feature detection discussion) where I only fall back to a version switch because I cannot detect the new svg image support.
(By the way, kudos to the github-onebox, given a link to a single line it determined the exact range of lines that I wanted to link to.)