Rails Active Storage: How do you index images?

Hi Guys,

Can someone help me work out how to index an image? I have a Profile model with a :profile_image which is an Active Storage Blob image. How do I go about indexing this and retreving it in my results?

Thanks for any help in advance.

Gerard

Profile.rb

include AlgoliaSearch

class Profile < ApplicationRecord
  belongs_to :user, dependent: :destroy
  has_one_attached :profile_image
  has_many :articles
  before_create :image_nil

  algoliasearch do
    attribute :bio, :residing, :profile_type
    attribute :user do
       { first_name: user.first_name, last_name: user.last_name, city: user.city }
    end
    attribute :profile_image do

    end
  end