Home > Uncategorized > Crop center and resize paperclip image attachment

Crop center and resize paperclip image attachment

has_attached_file :profile_image,
storage: :s3,
s3_credentials: {
bucket: Settings.s3_bucket_name,
access_key_id: Settings.aws_access_key_id,
secret_access_key: Settings.aws_secret_access_key
},
default_url: '/assets/default_profile_pic.png',
styles: { square_50: '', square_100: '', square_193: '' },
convert_options: {
square_50: '-gravity center -resize 50x50^ -crop 50x50+0+0',
square_100: '-gravity center -resize 100x100^ -crop 100x100+0+0',
square_193: '-gravity center -resize 193x193^ -crop 193x193+0+0'
}

Advertisements
Categories: Uncategorized Tags: , , ,
  1. January 6, 2015 at 5:15 pm

    has_attached_file :profile_image,
    storage: :s3,
    s3_credentials: {
    bucket: Settings.s3_bucket_name,
    access_key_id: Settings.aws_access_key_id,
    secret_access_key: Settings.aws_secret_access_key
    },
    default_url: ‘/assets/default_profile_pic.png’,
    styles: {
    square_50: ’50×50#’,
    square_100: ‘100×100#’,
    square_193: ‘193×193#’
    }

  2. February 20, 2017 at 1:57 pm

    I am very impressed by your site and your posts they very nice and very help us. You made a good site and giving us such a good information on this topic it’s very nice and amazing

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: