A Javascript utility for generating an <img>
source . It uses the HTML5 Canvas API to generate the image BLOB.
Using bower
bower install --save-dev dynamic-images
<img src="" data-dynamic/>
<img src="" data-dynamic data-width="500"/>
<img src="" data-dynamic data-height="200"/>
<img src="" data-dynamic data-background="yellow"/>
<img src="" data-dynamic data-widt="500" data-height="200" data-background="yellow"/>
<script src="bower_components/dynamic-images/dist/dynamic-images.min.js"></script>
<script>
new DynamicImages({
width: 200,
height: 200
});
</script>
When not specified the default value is used.
width
defaults to150px
height
defaults to150px
background
defaults to#ccc