Skip to content

Commit

Permalink
chore: release 4.8.0 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-stramavus committed Jul 16, 2021
1 parent 3fce406 commit 8c73b35
Show file tree
Hide file tree
Showing 19 changed files with 536 additions and 335 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,31 @@ Types of changes:
- ...

-------------
## 4.8.0 - 2021-06-16

### Deprecated

Property **ignoreNodeImgSize** is deprecated. Use **imageSizeAttributes: 'ignore'** instead

### Added
- new property:

##### **imageSizeAttributes**

###### Type: **String** | possible values: 'use', 'ignore', 'take-ratio' | Default: **'use'**

If width and height attributes are set:

**use** - width & height attributes values will be used to calculate image size (according to user's DPR) and **ratio**.

**take-ratio** - width & height attributes values will be used only to calculate **ratio**.

**ignore** - width & height attributes will be ignored.

If width and height attributes are NOT set, image container size will be detected to calculate result image size (according to user's DPR)

*Note*: If only width or height attributes is set, ratio is going to be taken from ci-ratio image attribute

## 4.7.0 - 2020-02-23
### added
- add custom root element to process function
Expand Down
23 changes: 20 additions & 3 deletions README-BLUR-HASH.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Release](https://img.shields.io/badge/release-v4.7.0-blue.svg)](https://github.com/scaleflex/js-cloudimage-responsive/releases)
[![Release](https://img.shields.io/badge/release-v4.8.0-blue.svg)](https://github.com/scaleflex/js-cloudimage-responsive/releases)
[![Free plan](https://img.shields.io/badge/price-includes%20free%20plan-green.svg)](https://www.cloudimage.io/en/home#b38181a6-b9c8-4015-9742-7b1a1ad382d5)
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)](#contributing)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
Expand Down Expand Up @@ -116,7 +116,7 @@ You have to pay attention on the following things:
Add script tag with CDN link to js-cloudimage-responsive

```javascript
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-responsive/4.7.0/blur-hash/js-cloudimage-responsive.min.js"></script>
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-responsive/4.8.0/blur-hash/js-cloudimage-responsive.min.js"></script>
```

or using npm
Expand Down Expand Up @@ -313,6 +313,23 @@ const cloudimageConfig = {

List of supported device pixel ratios. If there is no need to support retina devices, you should set empty array `devicePixelRatioList: []`

### imageSizeAttributes

###### Type: **String** | possible values: 'use', 'ignore', 'take-ratio' | Default: **'use'**

If width and height attributes are set:

**use** - width & height attributes values will be used to calculate image size (according to user's DPR) and **ratio**.

**take-ratio** - width & height attributes values will be used only to calculate **ratio**.

**ignore** - width & height attributes will be ignored.

If width and height attributes are NOT set, image container size will be detected to calculate result image size (according to user's DPR)

*Note*: If only width or height attributes is set, ratio is going to be taken from ci-ratio image attribute


## <a name="image_properties"></a> Image properties

Cloudimage responsive plugin will make image on your page responsive if you replace the `src` with `ci-src` attribute in the `<img>` tag:
Expand Down Expand Up @@ -450,7 +467,7 @@ add the following scripts right after js-cloudimage-responsive script
window.lazySizesConfig = window.lazySizesConfig || {};
window.lazySizesConfig.init = false;
</script>
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-responsive/4.7.0/blur-hash/js-cloudimage-responsive.min.js"></script>
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-responsive/4.8.0/blur-hash/js-cloudimage-responsive.min.js"></script>
<script src="https://cdn.scaleflex.it/filerobot/js-cloudimage-responsive/lazysizes.min.js"></script>
```

Expand Down
22 changes: 19 additions & 3 deletions README-PLAIN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Release](https://img.shields.io/badge/release-v4.7.0-blue.svg)](https://github.com/scaleflex/js-cloudimage-responsive/releases)
[![Release](https://img.shields.io/badge/release-v4.8.0-blue.svg)](https://github.com/scaleflex/js-cloudimage-responsive/releases)
[![Free plan](https://img.shields.io/badge/price-includes%20free%20plan-green.svg)](https://www.cloudimage.io/en/home#b38181a6-b9c8-4015-9742-7b1a1ad382d5)
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)](#contributing)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
Expand Down Expand Up @@ -110,7 +110,7 @@ This version of plugin doesn't add any CSS or change layout thus no effect on yo
Add script tag with CDN link to js-cloudimage-responsive

```javascript
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-responsive/4.7.0/plain/js-cloudimage-responsive.min.js"></script>
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-responsive/4.8.0/plain/js-cloudimage-responsive.min.js"></script>
```

or using npm
Expand Down Expand Up @@ -310,6 +310,22 @@ ciResponsive.init();

Breakpoints shortcuts to use in image size property, can be overwridden.

### imageSizeAttributes

###### Type: **String** | possible values: 'use', 'ignore', 'take-ratio' | Default: **'use'**

If width and height attributes are set:

**use** - width & height attributes values will be used to calculate image size (according to user's DPR) and **ratio**.

**take-ratio** - width & height attributes values will be used only to calculate **ratio**.

**ignore** - width & height attributes will be ignored.

If width and height attributes are NOT set, image container size will be detected to calculate result image size (according to user's DPR)

*Note*: If only width or height attributes is set, ratio is going to be taken from ci-ratio image attribute

## <a name="image_properties"></a> Image properties

Cloudimage responsive plugin will make image on your page responsive if you replace the `src` with `ci-src` attribute in the `<img>` tag:
Expand Down Expand Up @@ -430,7 +446,7 @@ add the following scripts right after js-cloudimage-responsive script
window.lazySizesConfig = window.lazySizesConfig || {};
window.lazySizesConfig.init = false;
</script>
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-responsive/4.7.0/plain/js-cloudimage-responsive.min.js"></script>
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-responsive/4.8.0/plain/js-cloudimage-responsive.min.js"></script>
<script src="https://cdn.scaleflex.it/filerobot/js-cloudimage-responsive/lazysizes.min.js"></script>
```

Expand Down
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Release](https://img.shields.io/badge/release-v4.7.0-blue.svg)](https://github.com/scaleflex/js-cloudimage-responsive/releases)
[![Release](https://img.shields.io/badge/release-v4.8.0-blue.svg)](https://github.com/scaleflex/js-cloudimage-responsive/releases)
[![Free plan](https://img.shields.io/badge/price-includes%20free%20plan-green.svg)](https://www.cloudimage.io/en/home#b38181a6-b9c8-4015-9742-7b1a1ad382d5)
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)](#contributing)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
Expand Down Expand Up @@ -115,13 +115,13 @@ You have to pay attention to the following things:
Add a style tag with CDN link to js-cloudimage-responsive in the head of your site

```javascript
<link href="https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-responsive/4.7.0/js-cloudimage-responsive.min.css?vh=a076ef&func=proxy"></link>
<link href="https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-responsive/4.8.0/js-cloudimage-responsive.min.css?vh=a076ef&func=proxy"></link>
```

Add a script tag with CDN link to js-cloudimage-responsive

```javascript
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-responsive/4.7.0/js-cloudimage-responsive.min.js"></script>
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-responsive/4.8.0/js-cloudimage-responsive.min.js"></script>
```

or using npm
Expand Down Expand Up @@ -328,6 +328,22 @@ Default:

Breakpoints shortcuts to use in image size property, can be overridden.

### imageSizeAttributes

###### Type: **String** | possible values: 'use', 'ignore', 'take-ratio' | Default: **'use'**

If width and height attributes are set:

**use** - width & height attributes values will be used to calculate image size (according to user's DPR) and **ratio**.

**take-ratio** - width & height attributes values will be used only to calculate **ratio**.

**ignore** - width & height attributes will be ignored.

If width and height attributes are NOT set, image container size will be detected to calculate result image size (according to user's DPR)

*Note*: If only width or height attributes is set, ratio is going to be taken from ci-ratio image attribute

## <a name="image_properties"></a> Image properties

The Cloudimage responsive plugin will make an image on your page responsive if you replace the `src` with a `ci-src` attribute in the `<img>` tag:
Expand Down Expand Up @@ -456,7 +472,7 @@ add the following scripts right after js-cloudimage-responsive script
window.lazySizesConfig = window.lazySizesConfig || {};
window.lazySizesConfig.init = false;
</script>
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-responsive/4.7.0/js-cloudimage-responsive.min.js"></script>
<script src="https://cdn.scaleflex.it/plugins/js-cloudimage-responsive/4.8.0/js-cloudimage-responsive.min.js"></script>
<script src="https://cdn.scaleflex.it/filerobot/js-cloudimage-responsive/lazysizes.min.js"></script>
```

Expand Down
6 changes: 3 additions & 3 deletions build/blur-hash/js-cloudimage-responsive.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/blur-hash/js-cloudimage-responsive.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/low-preview/js-cloudimage-responsive.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8c73b35

Please sign in to comment.