We've moved discussions to Discord

url_for image with variant cant work on heroku

I tried to make it work but when I deploy to heroku and use S3 to store the file. The upload is ok but anytime I have used url_for => the app will crash. any one can help?  Chris Oliver  
Jon Sullivan
Depending on how old your app is / when you scaffolded it from JSP this may be a Vips issue — Rails 7 now uses Vips by default for Active Storage image processing (like generating variants), which it does at time-of-variant-request, not time of upload (though they're cached after that point). I haven't done it myself yet but you may need to add a build pack (like this one https://elements.heroku.com/buildpacks/brandoncc/heroku-buildpack-vips) to add Vips to your dynos.

Chris Oliver — that may actually be worth adding to the app.json buildpack declarations.
Yes, Thanks  Jon Sullivan  . I found the solution for it. Install Heroku APT with the package then add the VIPS buildpack can solve the problems.
Notifications
You’re not receiving notifications from this thread.