Method: IsoDoc::Function::Utils#image_localfile

Defined in:
lib/isodoc/function/utils.rb

#image_localfile(img) ⇒ Object



201
202
203
204
205
206
207
208
209
# File 'lib/isodoc/function/utils.rb', line 201

def image_localfile(img)
  img.name == "svg" && !img["src"] and
    return save_svg(img)
  case img["src"]
  when /^data:/ then save_dataimage(img["src"], false)
  when %r{^([A-Z]:)?/} then img["src"]
  else File.join(@localdir, img["src"])
  end
end