class ActiveStorage::Previewer::PopplerPDFPreviewer
def preview(**options)
def preview(**options) download_blob_to_tempfile do |input| draw_first_page_from input do |output| yield io: output, filename: "#{blob.filename.base}.png", content_type: "image/png", **options end end end