# File lib/html/pipeline/absolute_source_filter.rb, line 19 def call doc.search('img').each do |element| next if element['src'].nil? || element['src'].empty? src = element['src'].strip next if src.start_with? 'http' base = if src.start_with? '/' image_base_url else image_subpage_url end element['src'] = URI.join(base, src).to_s end doc end