Skip to content
This repository has been archived by the owner on Aug 6, 2018. It is now read-only.

Image cropping support #8

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Image cropping support #8

wants to merge 14 commits into from

Conversation

nervetattoo
Copy link
Contributor

This adds image cropping support:
screen shot 2015-01-28 at 13 01 27

Crops can be set up as a JSON:

{"main":[1200,400],"thumb":[300,200]}

And later accessed in templates:

<img src="{{entry.image.url('main')}}">

Go to a specific thumb and type in some fancy-smancy JSON
to define your scaled versions.
Then edit an entry with a media selected and boom hit "Crop"
to get a scaler view where you can select 1 crop for each
scale version you set up.

This adds some new semantics to templating mediaflow fields as well:

```twig
{{entry.image.url('thumb')}}
```

Loads the `thumb` version from this field settings example:

```js
{"thumb":[100,100]}
```
@bHelland
Copy link
Member

Hi Raymond!

Any reason why this wasn't merged to master before you left?

@nervetattoo
Copy link
Contributor Author

Needed more real world testing, I think RR experienced some bugs.

@oyvindostmo
Copy link

Sure did - we could not get the crop to show in a template in our environment. We are open and ready for testing @beery

@bHelland
Copy link
Member

I guess the problem relates to this issue: #9, which I have commented on now

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

Successfully merging this pull request may close these issues.

3 participants