<commit_before># Ember-cli-cloudinary-images

This addon contains components to make the usage of images from [Cloudinary](http://cloudinary.com/) easy. Made by [HappySale](http://www.happysale.com/)

## Installation

* `ember install:addon ember-cli-cloudinary-images`

## Usage

After installation you have new components: `{{c-img}}` and `{{c-avatar}}`.

The way it can be used:

```handlebars
It will automatically resolve to the right image URL
{{c-img account='happysale' media='cdn/common/logo'}}

For resized image, use `w` for width and `h` for height
{{c-img account='happysale' w='100' media='cdn/common/logo'}}

For using filters, use the filters attribute
{{c-img account='happysale' filters='c_fill' media='cdn/common/logo'}}
```

For getting user profile image use `{{c-avatar}}` component:

```handlebars
{{c-avatar account='happysale' network='twitter_name' user='iamdevloper'}}
```

Because usually there is only one Cloudinary account in used, you can create `initializer` for that:

```javascript
import CImg from 'ember-cli-cloudinary-images/components/c-img';

export function initialize() {
  CImg.reopen({ account: 'happysale' });
}

export default {
  name: 'cloudinary',
  initialize: initialize
};
```<commit_msg>added instruction about properties which have no examples<commit_after># Ember-cli-cloudinary-images

This addon contains components to make the usage of images from [Cloudinary](http://cloudinary.com/) easy. Made by [HappySale](http://www.happysale.com/)

## Installation

* `ember install:addon ember-cli-cloudinary-images`

## Usage

After installation you have new components: `{{c-img}}` and `{{c-avatar}}`.

The way it can be used:

```handlebars
It will automatically resolve to the right image URL
{{c-img account='happysale' media='cdn/common/logo'}}

For resized image, use `w` for width and `h` for height
{{c-img account='happysale' w='100' media='cdn/common/logo'}}

For using filters, use the filters attribute
{{c-img account='happysale' filters='c_fill' media='cdn/common/logo'}}
```

For getting user profile image use `{{c-avatar}}` component:

```handlebars
{{c-avatar account='happysale' network='twitter_name' user='iamdevloper'}}
```

Because usually there is only one Cloudinary account in used, you can create `initializer` for that:

```javascript
import CImg from 'ember-cli-cloudinary-images/components/c-img';

export function initialize() {
  CImg.reopen({ account: 'happysale' });
}

export default {
  name: 'cloudinary',
  initialize: initialize
};
```

### More properties

- `version` for choosing version of the asset
- `protocol` for choosing protocol (`http`/`https`)
- `cdn` if you have a custom URL instead of using Cloudinary's URL

{'fraction_non_alphanumeric': 0.140117994100295, 'fraction_numerical': 0.0022123893805309734, 'mean_word_length': 5.353629976580796, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '271924', 'n_tokens_mistral': 874, 'n_tokens_neox': 832, 'n_words': 279}