@simpleimg/image-js
v1.0.13
Published
This module helps you integrate Simple Image Cloud - Image Component with pure Javascript. It allows you to serve images from Simple Image Cloud CDN with transformations and variations easily.
Downloads
19
Readme
Simple Image Cloud - Image for Javascript
This module helps you integrate Simple Image Cloud - Image Component with pure Javascript. It allows you to serve images from Simple Image Cloud CDN with transformations and variations easily.
Install
Embed our client library via the <script>
tag in the <head>
section of each page where you’d like to use Simple Image Cloud Images.
<script data-account="[YOUR_ACCOUNT_ID]"
data-selector="img[data-src]"
src="https://static.simpleimg.io/image-js/index.js"></script>
You can define some global variables to customize the account and selector .
Property | Required | Type | Comment
-------- | -------- | ---- | -------
data-account | required | string
| Simple Image Cloud Account ID.
data-selector | optional | string
| Define custom selector.
Documentation
You can find the documentation for the Image JS Component here.
Quick Usage - Single Image - fit/contain
<img data-src="image-1.jpg"
data-width="500"/>
Quick Usage - Single Image - fill/cover
<img data-height="500"
data-mode="fill"
data-src="image-1.jpg"
data-width="500"/>
Feedback
We want to hear your issue reports and feature requests at [email protected]