class ActiveStorage::Blob

def image?

Returns true if the content_type of this blob is in the image range, like image/png.
def image?
  content_type.start_with?("image")
end