Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9142445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:47:05+00:00 2026-06-17T09:47:05+00:00

Any ruby implementation with paperclip to autosmush amazon s3 images? PS: I googled and

  • 0

Any ruby implementation with paperclip to autosmush amazon s3 images?

PS: I googled and got this: https://github.com/grosser/smusher and works pretty nicely on my local machine. But to use something like this on amazon s3. It will be great to have an automated process for this and just smush newly created content. Any ideas?

Code I am using to some what optimise user uploaded images.

has_attached_file :attachment, {
    :styles => {
      :medium => ["654x5000000>", :jpg],
      :small => ["260x50000000>", :jpg], 
      :thumb => ["75x75#", :jpg],
      :facebook_meta_tag =>["200x200#", :jpg] 
    },
    :convert_options => {
       :medium => "-quality 80 -interlace Plane",
       :small => "-quality 80 -interlace Plane",
       :thumb => "-quality 80 -interlace Plane",
       :facebook_meta_tag => "-quality 80 -interlace Plane" 
       },
       :s3_headers => { 'Cache-Control' => 'max-age=315576000', 'Expires' => 10.years.from_now.httpdate } 
    }.merge(PAPERCLIP_STORAGE_OPTIONS)

But still images can be optimised. I got the gem smusher but confused how to use it. My current page ranking as per GTmetrics is here.

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:47:06+00:00Added an answer on June 17, 2026 at 9:47 am

    I have also been looking into lossless image compression with rails, and so far I think the best gem I have found is here. The instructions with the gem say to add a :processors option that gets passed a hash containing multiple processing options, such as :compression, which this gem defines. It also requires jpgtran and optipng to be installed, which I’m not sure if Amazon S3 has.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using whenever(https://github.com/javan/whenever) ruby gem to insert a crontab entry in after_create callback
is there any way I can reproduce this ruby function: def Password.hash(password,salt) Digest::SHA512.hexdigest(#{password}:#{salt}) end
In this video: http://www.facebook.com/video/video.php?v=596368660334 Facebook talks about their implementation of Haste -- a CSS
I've been looking for a SWANK server implementation for Ruby. I found https://bitbucket.org/yinwm/usemacs/src/5bb82e78239c/raw-elisp/march/macos/site-lisp/slime/contrib/swank.rb but
I'm working on an implementation of the Fair Barbershop problem in Ruby. This is
Is there any state machine implementation for Ruby or Ruby on Rails that supports
Is there any ruby gem/ rails plugin available for parsing the resume and importing
Is there any PHP or Ruby library to convert Tranditional Chinese to Simplified Chinese
like DOMDocument class in PHP, is there any class in RUBY (i.e the core
In Ruby is there any method that lists all the global variables available at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.