Fixed img algorithm to take both src and srcset into account