Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retina_rails ignores convert options #49

Open
Waylon87 opened this issue Oct 11, 2014 · 2 comments
Open

retina_rails ignores convert options #49

Waylon87 opened this issue Oct 11, 2014 · 2 comments

Comments

@Waylon87
Copy link

I'm having an issue where retina rails is ignoring the convert_options that I set.

:convert_options => { :twitter => "-background white -compose Copy -gravity center -extent 640x640" }

It converts fine when I turn retina rails off.

I also noticed that retina rails does not respect percentages in the style options, it seems to be converting them to pixels.

I will try to investigate further in the code to see if I can come up with a solution.

@jhnvz
Copy link
Owner

jhnvz commented Oct 11, 2014

Could you show me the code in your model?

@Waylon87
Copy link
Author

@jhnvz See below.

retina!
has_attached_file :image,
    :styles => { :large => "400x", :grid => "320x", :thumb => "120x", :facebook => "100%x100%>", :twitter => "640x640>" }
    :convert_options => {
        :twitter => "-background white -compose Copy -gravity center -extent 640x640",
        :facebook => "-background white -compose Copy -gravity center -extent 191%x100%"
    },
    :storage => :s3,
    :s3_credentials => "#{Rails.root}/config/s3.yml",
    :path => ":class/:attachment/:id/:style/:filename",
    :s3_headers => { 'Cache-Control' => 'max-age=315576000', 'Expires' => 10.years.from_now.httpdate },
    :retina => { :quality => 80 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants