New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider: Switching from ImageMagick to Vips #20269
Comments
If this is done, then switching will be simpler: #7414 |
Having switched from The security aspect is major and the speed/memory boosts are impresive. A potential drawback here is that Also https://github.com/janko/image_processing is a very nice gem to abstract image manipulation (with |
For information on broader usage it's also possible to look at the Wikimedia wikis' experience with VipsScaler. See for example VipsScaler implementation by volunteer developer improves image handling on Wikimedia sites (2013). |
FYI switching to Vips is in the roadmap. No date yet, but we want to rework the whole media storage system and it will most definitely be part of it. |
Pitch
In Rails 7, the default image process is now vips rails/rails#42744
It's faster and uses less memory, ruby-vips can also fall back to ImageMagick if needed (although kt-paperclip doesn't use ruby-vips which would require switching to ActiveStorage).
The is a guide on how to migrate to vips can be found here: https://gist.github.com/brenogazzola/a4369965a1da426d50f11d080fe2e563
On Heroku either a custom apt-file or buildpack would be needed, https://elements.heroku.com/buildpacks/brandoncc/heroku-buildpack-vips
As the image processor is using kt-paperclip you would need to use this fork for the image processor https://github.com/tsu-social/paperclip-vips
It might also be worth switching to ActiveStorage, but I opened another issue for that.
Motivation
All servers:
The text was updated successfully, but these errors were encountered: