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 8854947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:00:29+00:00 2026-06-14T14:00:29+00:00

Im using carrier wave to upload gifs which works just fine, the problem comes

  • 0

Im using carrier wave to upload gifs which works just fine, the problem comes when i try to generate the thumb version and converting the gif into a jpeg with only the first image in the gif as the thumb, i get an error:

LocalJumpError in ImagesController#create

no block given (yield)

app/controllers/images_controller.rb:21:in `new'
app/controllers/images_controller.rb:21:in `create'

Request

Parameters:

{"utf8"=>"✓",
"authenticity_token"=>"lPEjP1WtPxFdizL2/FAWGHzOZPtecb5nKzKO8dg5ZdE=",
"image"=>{"image"=>#<ActionDispatch::Http::UploadedFile:0x007ff5d4cdc720 @original_filename="some-file-name.gif",
@content_type="image/gif",
@headers="Content-Disposition: form-data; name=\"image[image]\"; filename=\"some-file-name.gif\"\r\nContent-Type: image/gif\r\n",
@tempfile=#<File:/var/folders/c8/1t7w8nln4b3bvs4_nv2cyn2m0000gt/T/RackMultipart20120326-5101-gcyvk0>>,
"remote_image_url"=>"",
"title"=>"The red panda",
"nsw"=>"0"},
"commit"=>"Roll GIF"}

Here’s the code im using to generate the thumb:

version :thumb do
    process :resize_to_limit => [200, 200]
    process :convert => 'jpg'
end

Hope you guys can help and thanks in advance.

  • 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-14T14:00:30+00:00Added an answer on June 14, 2026 at 2:00 pm

    To remove animations from a gif image using carrierwave, you can define the following processor:

    def remove_animation
      manipulate! do |img, index|
        index == 0 ? img : nil
      end
    end
    

    So, the code for the thumb version will be:

    version :thumb do
      process :remove_animation
      process :resize_to_limit => [200, 200]
      process :convert => 'jpg'
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to configure an upload path for Carrier wave Direct,which I am using
I am using the Carrierwave plugin to upload images. It works fine, but if
Im using carrier wave to upload assets to my app they are stored in
I am using Rails Carrier Wave with JQuery Upload like on this rails tutorial
I am using carrierwave to upload images to amazon s3. This works great on
I'm using carrierwave in my application. The problem is it works well in development
I'm using CarrierWave / Fog in a Rails application to upload videos to Amazon
I'm using Rails 3.2, Carrierwave and simple_form. Currently, everything is working fine with one
I just switched from storing my images uploaded via Carrierwave locally to using Amazon
I'm using the carrierwave gem to upload file attachments to Google cloud storage. This

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.