Change image src or background image path based on the size of the element