Altify automizes the task of inserting alternative text attributes for image tags. Altify uses Microsoft Computer Vision API's deep learning algorithms to caption images in an HTML file and returns a new HTML file in which alt attributes are filled out with their corresponding captions.
Notice: Altify will now ignore any image tag whose alt attribute has content or is just an empty string. (In compliance with standard web practices)
- BeautifulSoup
- Python 2.7
- html5lib
https://www.microsoft.com/cognitive-services/en-us/sign-up.
Open up terminal and enter: pip install altify
altify path_to_your_html api_key
A new HTML file called altify.html is created next to the HTML file you selected. (Or Desktop, when using older versions)
- Parses the html using BeautifulSoup.
- Find all the image tags.
- Stream images using uploads.im API, and then with its URL, send request to Microsoft's API to caption.
- Filter images that are smaller than 200px width.
- Fill out the alt attributes for all the images.
- Write an edited HTML file next to the file you selected.
Donald Trump wearing a suit and tie
A piano keyboard
A squirrel eating
A close up of a cat looking at the camera
A woman wearing a red hat
A small boat in a lake surrounded by mountains
Humans are currently better at captioning images than machines. Use responsibly!