ruby on rails - Paperclip not sizing correctly -
I am using a paperclip for my app and the images are not consistent with the sizes that I set them. I am using paperclip and ramagic and image magic is established. When I Convert development.rb Gemfile User.rb view A (: thumbs up) B (: medium) becomes 160x160 A (Medium) gets 210x151 / P> B (increases) 300x300 I have tried to upload the image again after resizing, but I have received the same result. So, is there a problem in the image of different sizes of paper clips or whether my code Is there a problem in the? You need to change your trailing character after the dimension of your size, Therefore, in your case you need document Psht the states For your current images you can do this in the console After which any other images you upload will not need to be reprocessed and will be resized as you need Hopefully
C: \ Program Files \ ImageMagick-6.8.9-Q16 \ convert.exe C: \ Windows \ System32 \ Convert. Exe
paperclip. Option [: command_path] = "C: / Program Files / ImageMagic-6.8.9-Q16 / Convert exe"
Mani paperclip 'Gem' rmagick ',' ~ & gt; 2.13.2 ',: platform = & gt; : Ruby
is_teated_file: avatar, genres: {Medium: '210x260'; Large: "300x300" gt; "Thumbs:" 100x100> "}, Default_url:" /assets/default.png "Validities_itity_cent_type: avatar: content_type => [" image / jpg "," image / jpeg "," image / png "," image / gif "]
& lt;% = Image_tag @ user.avatar (** style **)%> < p> I am testing it on two different images at different sizes, A (basically 960x688) and B (basically 160x160)
medium: 210x260 #
retaining resize the default behavior of the image aspect ratio (ie: European version of the 300 E will be 200 A 150 image? 100). Some commonly used options are: tracing of '#', thumbnails will be centrally stopped, ensure the requested dimensions. Following '& gt;', the thumbnail will only be modified if it is currently enlarging the requested dimensions (i.e.: thumb 80 for the 80. The original image will be unchanged)
Image .all.each {| S | S.image.reprocess! }
Comments
Post a Comment