Elevate your website's image accessibility, improve SEO, and enhance the overall user experience by effortlessly providing meaningful descriptions for your visuals. Alt Text Generator is an easy-to-use tool that uses artificial intelligence (AI) to automatically generate SEO-friendly alt text for images.
It leverages Microsoft's Azure Computer Vision API to analyze and describe the content of an image, providing information about the image content and context.
Before you begin, ensure you have met the following requirements:
- Node.js >= 16.14.0
Follow these steps to get the project up and running on your own machine.
-
Clone the repository:
git clone https://github.com/itsvijaysingh/alt-text-generator.git
-
Install project dependencie using:
npm install / npm i
-
Set up your environment variables: To configure the project, create a .env file in the project root and add the following variables:
- PORT: Port number for the server (Default: 5500). - AZURE_VISION_API_KEY: Your Azure Computer Vision API key. - AZURE_VISION_ENDPOINT: Your Azure Computer Vision API endpoint. - AZURE_VISION_MODEL_VERSION: (Optional) Azure model version (Default: 2023-02-01-preview). - AZURE_VISION_FEATURES: (Optional) Azure features to use (Default: caption). - AZURE_VISION_GENDER_NEUTRAL: (Optional) Enable gender-neutral captions (Default: true).
-
Run the Project To start the project, use npm:
node app.js
- The application will be available at http://localhost:5500 (if hosting locally).
- Upload an image using the provided interface.
- Click the "Generate Alt Texts" button.
- The AI will analyze the image and provide an alt text description.
This project is licensed under the GNU General Public License (GPL-3.0). See the LICENSE file for details.