ImageOptimization in ActiveStorage

I plan to upgrade the rails to 5.2 on one of my sites and introduce ActiveStorage, since right now I'm using paperclip with paperclip_optimizer. One of the downsides is that I lose the optimizer when replacing an ActiveStorage clip. How can I implement automatic image optimization when loading users into ActiveStorage?

+4
source share
2 answers

If you are on AWS, you can create a Lambda function that can listen to the S3 bucket for loading, and starts image optimization for recently downloaded files.

+1
source

Active Storage does not have built-in support for optimizing images on boot.

0

Source: https://habr.com/ru/post/1695054/


All Articles