The following will return a URL that will work, but is there a better method that doesn't require the concatenation of strings? I do not want to expose the service_url since that URL expires.
root_url + url_for(object.image.variant(resize: '140x140'))
Ultimately, I would like to do something like this
object.image.variant(resize: '140x140').absolute_url
I'm not sure if this is the recommended way, but you can use the polymorphic_url helper:
polymorphic_url object.image.variant(resize: '140x140')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With