简体   繁体   中英

Rails paperclip styles not working

I'm trying to apply styles to an image uploaded by paperclip, to save the original and a thumbnail.

has_attached_file :image, styles => { :thumb => "100x100", :original => "100%"},
                          :path => "images/:id/:style_:basename.:extension"

Is not working, it only saves the original, even I delete the :original => "100%" part. And I've ImageMagick installed and the gem rmagick .

:thumb => "100x100" s/b :thumb => "100x100>"

you forgot the >

see doc: https://github.com/thoughtbot/paperclip

删除此:original => "100%"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM