preview.rb

Some non-image blobs can be previewed: that is, they can be presented as
images. A video blob can be previewed by extracting its first frame, and a
PDF blob can be previewed by extracting its first page.

To choose the previewer for a blob, Active Storage calls
accept? on each registered previewer in order. It uses the
first previewer for which accept? returns true when given the
blob. In a Rails application, add or remove previewers by manipulating
Rails.application.config.active_storage.previewers in an
initializer:

These libraries are not provided by Rails. You must install them yourself
to use the built-in previewers. Before you install and use third-party
software, make sure you understand the licensing implications of doing so.