instance method
image?
Ruby on Rails 8.0.4
Since v5.2.8.1Signature
image?()
Returns true if the content_type of this blob is in the image range, like image/png.
Source
# File activestorage/app/models/active_storage/blob.rb, line 191
def image?
content_type.start_with?("image")
end
Defined in activestorage/app/models/active_storage/blob.rb line 191
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Blob