Skip to content
Caption images using Microsoft vision cognitive services and fills 'alt' text attributes of images with its caption
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
.gitignore
.npmignore
.travis.yml
Gruntfile.js
LICENSE
README.md
bower.json
img-alter.js
img-alter.min.js
package.json

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.

You can’t perform that action at this time.