Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

img-alter

Build Status

A Javascript module to fill 'ALT' attribute of all images in a web page using Microsoft Vision API.

sample gif file

Installation and Usage

1)Get free Microsoft Vision API Key from here.

Microsoft Vision uses deep learning to analyse an image.

2)Install via npm or bower

With npm :

npm install img-alter --save

With bower :

bower install img-alter --save

3) Add img-alter.js or img-alter.min.js to html file.

<script src="img-alter.js" type="text/javascript"></script>

4) Invoke API

Once the page load completes, Invoke

ImageAlter.fillImageAltTags({apiKey:"xxxxxxxxxxxxx"})

This will replace alternative attribute of all images in a webpage with its caption. Replace xxxxxxxxxxxxx with your own API Key.

Sample Images with Captions

bill clinton

Bill Clinton in a suit and tie

Laptop

a laptop computer

Fireworks

a fireworks in the dark

Pizza

a close up of a pizza on a wooden table

Plane

a fighter jet flying in the sky

Woman

a woman talking on a cell phone

Having Trouble

If you are having trouble using this library, please open a New Issue

Love this project?

Just give it a star(⭐️) and spread the word.

About

Caption images using Microsoft vision cognitive services and fills 'alt' text attributes of images with its caption

Resources

License

Packages

No packages published
You can’t perform that action at this time.