Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Active storage variants in Rails 6> #3255

Conversation

kallelundgren93
Copy link
Contributor

@kallelundgren93 kallelundgren93 commented Feb 19, 2020

Since upgrading to Rails 6, my team changed to use variants in active_storage with vips. In vips the old:

resize: "100x100"

results in a broken file for rails_admin users that uses vips.
Instead I've added a check to see if the project is using ruby-vips and in that case they will be using the resize method:

resize_to_limit: [100, 100]

Another way to go to check it, is to check:
config.active_storage.variant_processor
if that is preferrable.

@mshibuya mshibuya merged commit b552f2c into railsadminteam:master Feb 28, 2021
@mshibuya
Copy link
Member

Merged in, thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants