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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:48:52+00:00 2026-05-24T15:48:52+00:00

i am using file_column to upload images in my scaffold. : example of my

  • 0

i am using file_column to upload images in my scaffold.
:

example of my code:

file_column :name, :magick => {
                              :versions => {"iphone" => "1024x768", "thumb" => "60x60"},
                              :attributes => { :size => 100, :quality => 100 } 
                            }

but it is not working very properly. if i upload images of 500 Kb – 1 Mb my results “iphone” image size is only 20-30 KB and the image is very much blurred. The images of high quality 3MB, also has the same problem. The image is of very poor quality in this case also.

  • 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-05-24T15:48:52+00:00Added an answer on May 24, 2026 at 3:48 pm

    I dont know what was the problem, the code worked when I changed "iphone" to :iphone(i.e. made the keys of versions hash from string to symbol). The working code is shown here:

    file_column :name, :magick => {
                                  :versions => {:iphone => "1024x768", :thumb => "60x60"},
                                  :attributes => { :size => 100, :quality => 100 } 
                                }
    

    In the previous case, it was resizing the image to thumb size first, and then resizing the thumb image to 1024X768 size, I guess (hence the loss in quality). Very weird though.

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

Sidebar

Related Questions

I need to upload images using symfony, but ive not been able to do
I am currently using paperclip to upload images of items to my site. I
I'm using ftpwebrequest to upload and download a file. So far my code does
i'm trying to allow myself to upload 5 images for each model using active
My code is using file_get_contents() to make GET requests to an API endpoint. It
I am pretty new in Iphone Apps. How do I upload Image/Photo from my
I am displaying some image in my wpf app using following code: <Image Source={Binding
I am using django 1.4 and using django model's filefield to upload some document
I have some code that allows users to upload file attachments into a varbinary(max)
I have multiple images stored at URLs like: /uploads/hash/IMAGE001.jpg . Using jQuery UI's sortable()

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.