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

Cropping and setting JPG quality #160

Closed
alekseyg opened this issue Jun 12, 2015 · 6 comments
Closed

Cropping and setting JPG quality #160

alekseyg opened this issue Jun 12, 2015 · 6 comments

Comments

@alekseyg
Copy link

In addition to resizing, cropping and setting JPG quality would be very nice to have for images. Resizing alone is seldom used in real world applications, and if you're cropping and setting quality on photos in your desktop image editor, you may as well taylor the sizes right there and then.

@abemedia
Copy link

abemedia commented Jul 7, 2015

Couldn't agree more; cropping in particular would actually make the resize function really useful!
I found this gist which should make matters easy: https://gist.github.com/maxivak/3924976

@envygeeks envygeeks added this to the v2.0.0 milestone Jul 19, 2015
@alekseyg
Copy link
Author

I see in that commit quality was taken out of the README (I didn't see any corresponding code when I skimmed it). Will quality be implemented later?

@envygeeks envygeeks reopened this Aug 28, 2015
@envygeeks envygeeks added the bug label Aug 28, 2015
@envygeeks
Copy link
Owner

It was an accident, now that you brought it up you reminded me that I did intend to reproxy quality.

@mykagrove
Copy link

Did cropping get added back in the end?
I've tried a few variations of
{% image test.jpg [resize:100x100^ crop:100x100] %}
Trying to make it essentially crop zoom from any aspect ratio so the image ends up 100x100 with no stretching :)
(like background-size:cover in css)

@envygeeks
Copy link
Owner

Nobody can help you without a version, please give me a version.

@entozoon
Copy link

entozoon commented Sep 9, 2015

Ah sorry! I found a workaround in the end actually, having the image resize, then set that as a background-image and use it that way, i.e.:

<div style="background-image:url({% image test.jpg [resize:100x100^] | asset_path %})"></div>

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

No branches or pull requests

5 participants