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

Don't Resize Source Image #34

Open
brodyhoskins opened this issue May 26, 2015 · 12 comments
Open

Don't Resize Source Image #34

brodyhoskins opened this issue May 26, 2015 · 12 comments

Comments

@brodyhoskins
Copy link

Is there a way to not crop every style?

@descovi
Copy link

descovi commented Feb 1, 2016

+1

1 similar comment
@davidmccoy
Copy link

+1

@brodyhoskins
Copy link
Author

I've found a solution, it's a little hacky but I'll update here later on today when I get home from work.

@davidmccoy
Copy link

@brodyhoskins awesome. I'm stuck in a custom processor rabbit hole so I'd appreciate any other takes on this problem.

@davidmccoy
Copy link

@brodyhoskins any chance I could see your solution? Thanks!

@brodyhoskins
Copy link
Author

brodyhoskins commented May 6, 2016

@davidmccoy Sorry for the late response! It’s been so long that I found the solution, I can’t find it in my code. It did involve a custom processor though, but I’m unable to find it under /lib or /vendor. I’ve tried /config/initializers as well.

@davidmccoy
Copy link

No worries, thanks anyway

@davidmccoy
Copy link

For all those interested, the solution is to stop papercrop from automatically adding itself as a processor for every style. You can see how I did this here.

@darum
Copy link

darum commented Jun 11, 2016

@davidmccoy How should the styles declaration be then according to your solution? Something like this?

has_attached_file :image, styles: { thumb: {"150x150#", processors: [:papercrop] } }

Thanks!

@davidmccoy
Copy link

@darum you should specify the :geometry parameter as well as the :processor parameter, so:

has_attached_file :image, styles: { thumb: {geometry: "150x150#", processors: [:papercrop] } }

@darum
Copy link

darum commented Jun 15, 2016

Great, thanks!

On Mon, Jun 13, 2016 at 4:33 PM, David McCoy notifications@github.com
wrote:

@darum https://github.com/darum you should specify the :geometry
parameter as well as the :processor parameter, so:

has_attached_file :image, styles: { thumb: {geometry: "150x150#",
processors: [:papercrop] } }


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#34 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABCp5hEwVS6wwfCEH_IEGer2WOnLHFDqks5qLWoggaJpZM4Ep1bL
.

Luis Roig
luis@drawfolio.com
www.drawfolio.com

@heaven
Copy link

heaven commented Oct 29, 2016

Can anyone please tell me if I can use different aspect ratio for different styles?

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

5 participants