Socket
Socket
Sign inDemoInstall

js-cloudimg-responsive

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-cloudimg-responsive - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

build/js-cloudimage-responsive.v0.0.4.min.js

8

package.json
{
"name": "js-cloudimg-responsive",
"version": "0.0.3",
"version": "0.0.4",
"description": "Cloudimage responsive plugin will make your website load the exact image size you need depending on your user's screen size. Multiple pixel ratios are supported.",
"main": "dist/index.js",
"scripts": {
"start": "webpack-dev-server --mode development --config webpack-demo.config.js",
"build": "webpack --mode production --config webpack-plugin.config.js",
"build": "webpack --mode production --config webpack-build.config.js",
"transpile": "babel src -d dist --copy-files",
"prepublishOnly": "npm run transpile",
"start-demo": "webpack-dev-server --mode development --config webpack-demo.config.js",
"build-demo": "webpack --mode production --config webpack-demo.config.js",
"deploy-demo": "gh-pages -d examples/dist",
"publish-demo": "npm run build && npm run deploy-demo"
"publish-demo": "npm run build-demo && npm run deploy-demo"
},

@@ -15,0 +15,0 @@ "devDependencies": {

@@ -19,3 +19,11 @@ ![](https://demo.cloudimg.io/width/800/none/sample.li/Cloudimage_diagram.jpeg)

Add script tag with link to js-cloudimage-responsive
```
<script src="https://scaleflex.airstore.io/filerobot/plugins/js-cloudimage-responsive.v0.0.4.min.js"></script>
```
or using npm
```
$ npm install --save js-cloudimage-responsive

@@ -26,2 +34,15 @@ ```

```
<script>
const ciResponsive = new window.CIResponsive({
token: 'demo',
baseUrl: 'https://cloudimage.public.airstore.io/demo/'
});
ciResponsive.init();
</script>
```
or in new style with npm
```javascript

@@ -39,7 +60,10 @@

and just use the `ci-src` instead of the `src` attribute in image tag.
```html
<img ci-src="magnus-lindvall.jpg" ratio="1.5"/>
```
Note: as you see, usnig the Cloudimage plugin is very easy - just use the `ci-src` instead of the `src` attribute in image tag.
NOTE: "ratio" is recommended to prevent page layout jumping and to leverage visibility checking and thus lazy loading. Every other means to make the image have a certain height is also ok.
## Requirements

@@ -163,5 +187,11 @@

### ratio/r
###### Type: **Number** | _optional_
it is recommended to prevent page layout jumping and to leverage visibility checking and thus lazy loading. Every other means to make the image have a certain height is also ok.
***
To see the full cloudimage documentation [click here](https://docs.cloudimage.io/go/cloudimage-documentation)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc