Skip to content

Commit 4ef3673

Browse files
author
amrelbialy
committed
chore: release 1.1.0
1 parent 33d3e46 commit 4ef3673

File tree

4 files changed

+35
-16
lines changed

4 files changed

+35
-16
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ Types of changes:
2828
- ...
2929

3030
---
31+
# 1.1.0 - 2021-07-19
32+
33+
### Deprecated
34+
35+
- Property **ignoreNodeImgSize** is deprecated. Use **imageSizeAttributes: 'ignore'** instead
36+
37+
### Added
38+
- new property: **imageSizeAttributes**
3139
## 1.0.6 - 2020-05-13
3240
### Added
3341
- ignoreNodeImgSize props

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Release](https://img.shields.io/badge/release-v1.0.6-blue.svg)](https://github.com/scaleflex/vue-cloudimage-responsive/releases)
1+
[![Release](https://img.shields.io/badge/release-v1.1.0-blue.svg)](https://github.com/scaleflex/vue-cloudimage-responsive/releases)
22
[![Free plan](https://img.shields.io/badge/price-includes%20free%20plan-green.svg)](https://www.cloudimage.io/en/home#b38181a6-b9c8-4015-9742-7b1a1ad382d5)
33
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)](#contributing)
44
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
@@ -313,11 +313,21 @@ Delay for processing an image after rendering component.
313313
**NOTE:** normally the parameter is not needed, but in some cases with integrating third part libraries it can fix wrong
314314
calculation of image container.
315315
316-
### ignoreNodeImgSize
316+
### ImageSizeAttributes
317317
318-
###### Type: **boolean** | Default: **false** | _optional_
318+
###### Type: **String** | possible values: 'use', 'ignore', 'take-ratio' | Default: **'use'**
319319
320-
If set to true, the plugin ignores width and height attributes.
320+
If width and height attributes are set:
321+
322+
**use** - width & height attributes values will be used to calculate image size (according to user's DPR) and **ratio**.
323+
324+
**take-ratio** - width & height attributes values will be used only to calculate **ratio**.
325+
326+
**ignore** - width & height attributes will be ignored.
327+
328+
If width and height attributes are NOT set, image container size will be detected to calculate result image size (according to user's DPR)
329+
330+
*Note*: If only width or height attributes is set, ratio is going to be taken from ci-ratio image attribute
321331
322332
323333
## <a name="image_properties"></a> Image properties

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-cloudimage-responsive-plain",
3-
"version": "1.0.6",
3+
"version": "1.1.0",
44
"main": "dist/index.cjs.js",
55
"module": "dist/index.es.js",
66
"description": "Cloudimage Responsive will smartly resize, compress and accelerate images across the World in your site for all devices. The plugin supports lazy loading technique with blur hash placeholder.",
@@ -36,7 +36,7 @@
3636
"publish-demo": "npm run build-demo && npm run deploy"
3737
},
3838
"dependencies": {
39-
"cloudimage-responsive-utils": "^2.0.16",
39+
"cloudimage-responsive-utils": "^2.3.0",
4040
"core-js": "^3.6.5",
4141
"throttle-debounce": "^2.2.1"
4242
},
@@ -45,8 +45,6 @@
4545
"vue-lazyload": "^1.3.3"
4646
},
4747
"devDependencies": {
48-
"vue": "^2.6.11",
49-
"vue-lazyload": "^1.3.3",
5048
"@babel/cli": "^7.0.0",
5149
"@babel/core": "^7.10.5",
5250
"@babel/plugin-proposal-class-properties": "^7.0.0",
@@ -63,24 +61,26 @@
6361
"babel-loader": "^8.1.0",
6462
"babel-preset-vue": "^2.0.2",
6563
"css-loader": "^3.6.0",
64+
"deepmerge": "^2.0.1",
6665
"gh-pages": "^2.0.1",
6766
"html-webpack-plugin": "^4.3.0",
6867
"prismjs": "^1.20.0",
6968
"rimraf": "^3.0.2",
69+
"rollup": "^1.14.3",
70+
"rollup-plugin-babel": "^4.3.2",
71+
"rollup-plugin-commonjs": "^10.0.0",
72+
"rollup-plugin-vue": "^5.0.0",
73+
"shelljs": "^0.7.6",
7074
"style-loader": "^1.2.1",
7175
"throttle-debounce": "^2.2.1",
76+
"vue": "^2.6.11",
77+
"vue-lazyload": "^1.3.3",
7278
"vue-loader": "^15.9.3",
7379
"vue-prism-component": "^1.2.0",
7480
"vue-style-loader": "^4.1.2",
7581
"vue-template-compiler": "^2.6.11",
7682
"webpack": "^4.43.0",
7783
"webpack-cli": "^3.3.12",
78-
"webpack-dev-server": "^3.11.0",
79-
"rollup": "^1.14.3",
80-
"rollup-plugin-babel": "^4.3.2",
81-
"rollup-plugin-commonjs": "^10.0.0",
82-
"rollup-plugin-vue": "^5.0.0",
83-
"shelljs": "^0.7.6",
84-
"deepmerge": "^2.0.1"
84+
"webpack-dev-server": "^3.11.0"
8585
}
86-
}
86+
}

src/CloudImageProvider.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export default {
3030
xl: '(min-width: 1200px)' // from 1200 USUALSCREEN
3131
},
3232
params: this.cloudImageConfig.params? processParams(this.cloudImageConfig.params) :'org_if_sml=1',
33+
imageSizeAttributes: this.cloudImageConfig.imageSizeAttributes || 'use',
3334
innerWidth: typeof window !== 'undefined' ? window.innerWidth : null,
3435
previewQualityFactor: 10,
3536
doNotReplaceURL: this.cloudImageConfig.doNotReplaceURL || false,

0 commit comments

Comments
 (0)