-
Notifications
You must be signed in to change notification settings - Fork 66
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
Remove ImageKit #1164
Remove ImageKit #1164
Conversation
This changes the app to only rely on ActiveStorage and removes the third party dependency on ImageKit. Modern versions of Rails should be perfectly capable of serving thumbnails directly out of S3 without the help of a 3rd party service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I'll merge this later this weekend and make sure that things are working OK in production.
Cool will leave it to you then. Feel free to give me a ping when you do and I'm happy to help test 🥼 |
Via Slack from @jim:
My research on this led me to a couple of findings:
Given that both a vips switch and a Rails upgrade are nontrivial next steps, and given that ImageKit was not actively harming anything, I'm proposing we revert this change for now to give us a chance to follow through with Rails upgrades and we revisit with an implementation of Named Variants w/ preprocessing once we're at 7.1. |
Reverts #1164 See #1164 (comment) for background.
# What it does Configures ActiveStorage to use vips instead of imagemagick as its underlying image processor. Vips should use a lot less memory than imagemagick. See #1164 (comment) for more information and background. # Why it is important Currently an esoteric user traffic pattern has triggered ImageKit's throttling so images are broken on the site. # Implementation notes * My plan is to merge this, test it on staging, deploy it to production, and then remove IMAGEKIT_URL to see if the site works okay enough without any fancy variant preprocessing. The images will be a little slow on first load but I think this is better than no images! If it's super slow we can also run a loop in a rails console to manually preprocess all the existing items. * I'm not removing the IMAGEKIT_URL conditional yet which means we'll be able to quickly revert by restoring the environment variable. * My research suggests we can rely on the version of vips that comes preinstalled on Heroku rather than installing it ourselves. See Newlywords/heroku-buildpack-vips#36 for discussion. (There are some security implications of not being on the latest version, but we only have trusted users uploading images so I think we can afford to choose the simpler deployment option of using the existing package.)
What it does
This changes the app to only rely on ActiveStorage and removes the third party dependency on ImageKit.
Why it is important
Modern versions of Rails should be perfectly capable of serving thumbnails directly out of S3 without the help of a 3rd party service.
Resolves #1150
Implementation notes