# ember-cli-cloudinary-images

> Use images from Cloudinary easily

Latest version **0.4.1** (published 2015-12-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-cloudinary-images
pnpm add ember-cli-cloudinary-images
yarn add ember-cli-cloudinary-images
bun add ember-cli-cloudinary-images
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2015-12-07 |
| First published | 2015-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | ori livni |
| Maintainers | orisomething |
| Keywords | ember-addon, cloudinary, component, images |

## Links

- npm: https://www.npmjs.com/package/ember-cli-cloudinary-images
- Repository: https://github.com/oriSomething/ember-cli-cloudinary-images
- Homepage: https://github.com/oriSomething/ember-cli-cloudinary-images#readme
- Issues: https://github.com/oriSomething/ember-cli-cloudinary-images/issues
- npm.io page: https://npm.io/package/ember-cli-cloudinary-images

## Dependencies (3)

- [object-assign](https://npm.io/package/object-assign.md) ^4.0.1
- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^5.1.5
- [ember-cli-htmlbars](https://npm.io/package/ember-cli-htmlbars.md) ^1.0.1

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.4.1 (latest) — 2015-12-07
- 0.4.0-beta.4 (beta) — 2015-09-08
- 0.4.0-beta.2 — 2015-09-08
- 0.4.0-beta — 2015-09-07
- 0.3.0 — 2015-06-03
- 0.2.0 — 2015-06-02
- 0.1.0 — 2015-03-21
- 0.0.3 — 2015-03-21
- 0.0.2 — 2015-03-21
- 0.0.1 — 2015-03-21

## README

# Ember-cli-cloudinary-images

This addon contains a helper to get images URLs from [Cloudinary](http://cloudinary.com/) easy.
Made by [HappySale](http://www.happysale.com/)

## Installation

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

Required Ember version `2.1.0` and above


## Usage

After installation:
- use the helper `{{cloudinary-url}}` to generate images URLs
- for ease, set `CLOUDINARY` config inside Application environment file

inside `environment.js`:
```js
module.exports = function(environment) {
  var ENV = {
    // ···
    CLOUDINARY: {
      CLOUD_NAME: '···', // "cloud name" in Cloudinary
      SECURE: true, // use https?
      DOMAIN: '···', // dedicated domain if exists
      SUB_DOMAIN: '···', // dedicated sub-domain if exists
      CDN_DISTRIBUTION: false // use CDN distribution if needed
    }
  }
  // ···
};

```

using helper:
```handlebars

It will resolve to the image URL in Cloudinary:
<img src={{cloudinary-url "publicId"}}>

For resized image, use `width` and/or `height` for resizing:
<img src={{cloudinary-url "publicId" width="155" height="50"}}>

For using transforms, use the transforms attribute:
<img src={{cloudinary-url "publicId" transforms="c_fill"}}>

For getting twitter user's avatar:
<img src={{cloudinary-url "iamdevloper" type="twitter_name"}}>

Don't forget! you can unbound:
<img src={{unbound (cloudinary-url "publicId")}}>

```

### Full properties list

- `cloudName` - account name in Cloudinary
- `width` - for resize the image's width
- `height` - for resize the image's height
- `version` - for choosing version of the asset
- `domain` - for choosing dedicated domain if exists
- `subDomain` - for choosing dedicated sub-domain if exists
- `cdnDistribution` - for choosing if it will distribute between CDNs. default to `false`
- `secure` for choosing between `http` to `https`. default to `true`
- `resourceType` - default to `image`
- `type` - the repository of images. default to `upload` but can be replaced with `facebook`, `twitter`, `twitter_name` and so
- `format` - the image file format
- `transforms` - transforms that may apply


### Deprecations

The components `{{c-img}}` and `{{c-avatar}}` where deprecate for using the helper `{{cloudinary-url}}`.

The main reason is for having the ability to `unbound` for performance gains. But the side effects are:
- using images inside `SVG`s
- adding links to the full size images

__NOTE:__ the attributes where change to be more compline with Cloudinary's terminology.

New API:
```handlebars
Old:
{{c-img media="publicId"}}
{{c-avatar network="twitter_name" user="iamdevloper"}}

New:
<img src={{cloudinary-url "publicId"}}>
<img src={{cloudinary-url "iamdevloper" type="twitter_name"}}>

Better:
<img src={{unbound (cloudinary-url "publicId")}}>
<img src={{unbound (cloudinary-url "iamdevloper" type="twitter_name")}}>

```

---
_Source: https://npm.io/package/ember-cli-cloudinary-images · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
