THpubs
THpubs

Reputation: 8172

Is it possible to optimize images uploaded by Carrierwave gem?

In Rails, while using the carrierwave gem, can we optimize images that are being uploaded? Optimize means compress and shrink the file size?

Upvotes: 3

Views: 4037

Answers (1)

Maxim
Maxim

Reputation: 9961

Yes, it is possible. You should write own image processor and use ImageMagick or MiniMagick command to optimize images as you wish.

For example here is article about optimization of images with MiniMagick.


The second way is related to using such gems as carrierwave-imageoptimizer it provide image optimization out of the box.

Upvotes: 3

Related Questions