Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • implement thumbnail image in image uploader

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 282
    Comment on it

    how to implement thumbnail for image in rails.

    step 1:-

    go to uploader inside views where you have written image uploader code for uploading image. uncomment this section

        #Create different versions of your uploaded files:
          version :thumb do
            process :resize_to_fit => [50, 50]
          end
    

    And after uncommenting this implement include minimagick for your image uploader.

     

    step 2:-

            include CarrierWave::MiniMagick
    

    now you have to define thumbnail object in the views where you are rendering the image.

     

    step :-3

         <%= image_tag (category.category_image.thumb) if category.category_image? %>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: