refinerycms image not loading - dragonfly error

前端 未结 4 573
花落未央
花落未央 2021-01-12 06:57

I\'m working on developing a refinerycms rails app that was working good locally and now i\'ve moved it to my VPS and I was having issues with images that i uploaded through

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-12 07:27

    Try installing the refinery-images gem:

    Gemfile:
       gem 'refinerycms-page-images', '~>1.0.3' //refinery v1 compatible (v2 available also)
    

    Then in your model:

    belongs_to :imagesizeyouwant, :class_name => 'Image'
    

    If you look at the Image class you'll see a pretty nice set up for handling images. You can add image sizes in Refinery's Settings page in the admin tool. If you have a custom engine, just change :imagesizeyouwant to that size (mine was :thumbnail).

    When you post the image, look at the output of the identify command and try to run it on your own. Chances are your system has different parameters it uses for ImageMagick binaries, or that the dimensions being sent to it are not understood. Try posting the output of the actual command Dragonfly is calling in the shell so we can take a better look.

提交回复
热议问题