class LazyImagePostprocessor

Public Instance Methods

process(document, output) click to toggle source
# File lib/asciidoctor-lazy-images/extension.rb, line 4
def process document, output
  if document.basebackend? 'html'
    replacement = %(<img loading=lazy )
    output = output.gsub(/<img /, replacement)
  end
  output
end