Skip to content
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

Move from mini_magick to vips for ActiveStorage variant processor #3801

Open
veganstraightedge opened this issue Mar 6, 2024 · 0 comments
Open

Comments

@veganstraightedge
Copy link
Contributor

# TEMP: re-enable mini magick until variant syntax is changed to vips in ActiveStorageHelper#image_variant_by_width
config.active_storage.variant_processor = :mini_magick

# TEMP: re-enable mini magick until variant syntax is changed to vips in ActiveStorageHelper#image_variant_by_width
config.active_storage.variant_processor = :mini_magick

https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#active-storage-default-variant-processor-changed-to-vips

I think the main/only place that needs changing is the image_variant_by_width helper method, which has mini_magick/ImageMagick args in it that need to be changed to vips args.

def image_variant_by_width image, width
define = <<~DEFINE.squish
filter:support=2
jpeg:fancy-upsampling=off
png:compression-filter=5
png:compression-level=9
png:compression-strategy=1
png:exclude-chunk=all
DEFINE
image.variant filter: 'Triangle',
define: define,
thumbnail: width,
unsharp: '0.25x0.08+8.3+0.045',
dither: 'None',
posterize: '136',
quality: '82',
interlace: 'none',
colorspace: 'sRGB'
end

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

No branches or pull requests

1 participant