I have another quick question, if I have an active...
# avo-2
l
I have another quick question, if I have an active storage
has_many_attached :images
association, how could I go about showing a preview of the first one? Eg it doesn't work the same as a singular file. I tried using a computed field but it didn't like that.
l
you might be able to use the
external_image
field
and make it computed like your example
l
Ok, I'll try that and let you know, thanks
l
Copy code
ruby
field 'cover', as: :external_image, link_to_resource: true, only_on: :index do |model|
  helpers.main_app.url_for(model.images.first)
end
something like that
the external image expects the
src
of the image, so you need to get it from the blog/attachment
helpers.main_app.url_for(model.images.first)
I think this will get it for you, but not sure
l
👍