# vue-rokka-image

> Vue 2.x component for the image processing service rokka.io

Latest version **0.5.1** (published 2019-11-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-rokka-image
pnpm add vue-rokka-image
yarn add vue-rokka-image
bun add vue-rokka-image
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.1 |
| Published | 2019-11-15 |
| First published | 2019-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >8 |
| Dependencies | 0 |
| Unpacked size | 59.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | rokka.io |
| Maintainers | signalwerk |

## Links

- npm: https://www.npmjs.com/package/vue-rokka-image
- Repository: https://github.com/rokka-io/vue-rokka-image
- Homepage: https://github.com/rokka-io/vue-rokka-image#readme
- Issues: https://github.com/rokka-io/vue-rokka-image/issues
- npm.io page: https://npm.io/package/vue-rokka-image

## Recent versions

- 0.5.1 (latest) — 2019-11-15
- 0.5.0 — 2019-11-07
- 0.0.19 — 2019-11-02
- 0.0.20 — 2019-11-02
- 0.0.18 — 2019-11-01
- 0.0.17 — 2019-11-01
- 0.0.16 — 2019-11-01
- 0.0.15 — 2019-11-01
- 0.0.14 — 2019-10-31
- 0.0.13 — 2019-10-31
- 0.0.12 — 2019-10-31
- 0.0.11 — 2019-10-31
- 0.0.10 — 2019-10-30
- 0.0.9 — 2019-10-30
- 0.0.8 — 2019-10-30
- … 2 more at https://npm.io/package/vue-rokka-image/versions

## README

# Vue component for rokka images

[![npm](https://badgen.net/npm/v/vue-rokka-image)](https://www.npmjs.com/package/vue-rokka-image)
[![travis](https://badgen.net/travis/rokka-io/vue-rokka-image/beta)](https://travis-ci.org/rokka-io/vue-rokka-image)
[![bundlephobia zipped](https://badgen.net/bundlephobia/min/vue-rokka-image)](https://bundlephobia.com/result?p=vue-rokka-image)
[![bundlephobia minified](https://badgen.net/bundlephobia/minzip/vue-rokka-image)](https://bundlephobia.com/result?p=vue-rokka-image)
[![coveralls](https://badgen.net/coveralls/c/github/rokka-io/vue-rokka-image)](https://coveralls.io/github/rokka-io/vue-rokka-image)


[Vue 2.x](https://vuejs.org/) component for the image processing service [rokka.io](https://rokka.io/)

If you need a lazy version use [`vue-rokka-image-lazy`](https://github.com/rokka-io/vue-rokka-image-lazy)

## Demo 

[jsFiddle](https://jsfiddle.net/chregu/v4noLkgd/)

## Installation

```sh
npm i vue-rokka-image
```

## simple use

```vue
<rokka-img
  alt="alt"
  title="Title"
  organization="playground"
  stack="dynamic"
  hash="HASH"
  format="jpg"
  filename="image.jpg"
  :operations="[
    {
      name: 'resize',
      options: { mode: 'fill', width: 200, height: 200 }
     
    },
    { 
      name: 'crop', 
      options: { width: 200, height: 200 } 
    }
  ]"
/>
```

## use of picture
This produces two sources because there is an array in `optons` and `postfix`.



```vue
<rokka-picture
  alt="alt"
  title="Title"
  organization="playground"
  stack="dynamic"
  hash="HASH"
  format="jpg"
  filename="image.jpg"
  :operations="[
    {
      name: 'resize',
      options: { mode: 'fill', width: 200, height: 200 }
     
    },
    { 
      name: 'crop', 
      options: { width: 200, height: 200 } 
    }
  ]"
  
>
  <rokka-source
    :media="'all'"
    :postfix="['1x', '2x']"
    :options="[
      {
        dpr: '1'
      },
      {
        dpr: '2'
      }
    ]"
  />
  <rokka-img />
</rokka-picture>
```

---
_Source: https://npm.io/package/vue-rokka-image · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
