class ActiveStorage::Attachment
def preview(transformations)
Raises an +ArgumentError+ if +transformations+ is a +Symbol+ which is an
See ActiveStorage::Blob::Representable#preview for more information.
video.preview(:thumb).processed.url
or if you are using pre-defined variants:
video.preview(resize_to_limit: [100, 100]).processed.url
Example:
of +transformations+ provided.
Returns an ActiveStorage::Preview instance for the attachment with the set
def preview(transformations) transformations = transformations_by_name(transformations) blob.preview(transformations) end