It looks more complicated than it is. All its doing is searching for a particular type of tag that denotes an image on the NYT checking if there is no exisint img tag inside it, which means its a lazy loaded image with a single <span> tag saying "Image" and converting that span tag into a <img> tag for the rest of the news subsystem to download.
|