instance method
processed
Ruby on Rails 7.0.10
Since v5.2.8.1Signature
processed()
Processes the preview if it has not been processed yet. Returns the receiving ActiveStorage::Preview instance for convenience:
blob.preview(resize_to_limit: [100, 100]).processed.url
Processing a preview generates an image from its blob and attaches the preview image to the blob. Because the preview image is stored with the blob, it is only generated once.
Source
# File activestorage/app/models/active_storage/preview.rb, line 50
def processed
process unless processed?
self
end
Defined in activestorage/app/models/active_storage/preview.rb line 50
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Preview