Chrome Extension Submission Guide
2025-02-2321 turns18,512 charsgpt-4o
Summary
The user sought assistance in preparing a Chrome extension for submission to the Chrome Web Store, including writing permission justifications and a privacy policy.
Messages
help me list this in the chrome web store: # AI Filename Generator Chrome Extension
A Chrome extension that uses AI (LLaVa) to generate descriptive filenames for images when downloading them. The extension analyzes image content and suggests meaningful filenames based on what it sees.

## Features
- **Right-Click Menu Integration**
- Quick save with AI-generated filename
- Option to preview and customize filename before saving
- **Smart Filename Generation**
- Analyzes image content using AI
- Creates concise yet descriptive filenames
- Supports customizable filename formats
- **Local Processing with Ollama**
- Uses Ollama for local image analysis
- Fast and private - no data sent to external servers
- Requires Ollama with LLaVa model installed
- **User-Friendly Interface**
- Image preview
- Filename customization
- Format templates
- Progress indicators
- Error handling
## Installation
1. Clone this repository or download the source code
2. Open Chrome and navigate to `chrome://extensions/`
3. Enable "Developer mode" in the top right
4. Click "Load unpacked" and select the extension directory
## Setup
### Install and Configure Ollama
1. Install [Ollama](https://ollama.ai/) for your operating system
2. Pull the LLaVa model:
```bash
ollama pull llava
```
3. Start Ollama:
- On macOS/Linux: Ollama runs automatically after installation
- On Windows: Start Ollama from the Start Menu or run `ollama serve` in a terminal
4. Verify Ollama is running by opening `http://localhost:11434` in your browser
## Usage
### Quick Save
1. Right-click on any image
2. Select "Save with AI-generated filename"
3. The image will be saved automatically with an AI-generated filename
### Preview & Customize
1. Right-click on any image
2. Select "Generate filename (with preview)"
3. Click the extension icon in the toolbar
4. Preview the suggested filename
5. Edit if desired
6. Click "Save Download"
### Customize Settings
1. Click the extension icon
2. Access the Settings panel
3. Configure:
- Filename format template
- Preview preferences
4. Check Ollama status
## Filename Format Templates
Use these placeholders in your format:
- `{object}` - Main subject (required)
- `{location}` - Location context
- `{date}` - Current date
Example: `{object}-{location}-{date}.jpg`
## Permissions
The extension requires these permissions:
- `contextMenus`: For right-click menu integration
- `downloads`: To save images
- `storage`: To store settings
- `notifications`: For status updates
- `<all_urls>`: To access image URLs for processing
## Error Handling
The extension includes robust error handling for:
- Network issues
- API failures
- Timeout conditions
- Invalid responses
- Missing dependencies
## Development
### Project Structure
```
chrome-ai-filename-generator/
├── manifest.json # Extension configuration
├── background.js # Background script for context menu
├── content.js # Content script (if needed)
├── popup/ # Extension popup UI
│ ├── popup.html
│ ├── popup.js
│ ├── popup.css
├── api/ # API integration
│ ├── analyze.js
│ ├── llava_integration.js
├── icons/ # Extension icons
└── README.md
```
### Building
No build step required. The extension uses native ES modules.
### Testing
1. Make changes to the code
2. Reload the extension in `chrome://extensions/`
3. Test the changes
## Troubleshooting
### Common Issues
1. "Cannot connect to Ollama"
- Ensure Ollama is running
- Try visiting `http://localhost:11434` in your browser
- Restart Ollama if needed
2. "LLaVa model not found"
- Run `ollama pull llava` to install the model
- Check installed models with `ollama list`
3. "Failed to generate filename"
- Check if Ollama is running
- Verify the image URL is accessible
- Try reloading the extension
4. Extension not working
- Reload the extension in chrome://extensions
- Restart Chrome
- Ensure Ollama is running
## Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Submit a pull request
## License
MIT License - feel free to use and modify as needed.
To list your **AI Filename Generator** in the Chrome Web Store, follow these steps:
---
### **1. Prepare Your Extension Package**
Ensure your extension is properly structured:
- **manifest.json** should have all required permissions.
- **Icons** (128x128, 48x48, and 16x16) in PNG format.
- **Screenshots** (minimum 1280x800 or 640x400) showcasing features.
---
### **2. Create a Chrome Web Store Developer Account**
1. Go to the [Chrome Web Store Developer Dashboard](https://chrome.google.com/webstore/developer/dashboard).
2. Sign in with your Google account.
3. Pay the **one-time** $5 developer registration fee (if not already paid).
---
### **3. Upload Your Extension**
1. Click **"Add a new item"**.
2. Upload a **ZIP file** containing your extension files (no hidden `.git` or `.DS_Store` files).
3. Add extension details:
- **Title**: *AI Filename Generator*
- **Short Description**: *An AI-powered Chrome extension that generates descriptive filenames for images when downloading them.*
- **Detailed Description**: (Use a shortened version of your README)
- **Category**: *Productivity*
- **Tags**: *AI, Filename, Image, Productivity, Downloads*
- **Pricing**: *Free*
---
### **4. Add Images & Videos**
- **Screenshots**: Upload at least **1 high-resolution screenshot**.
- **Promotional Banner (Optional)**: 440x280px PNG.
- **Preview Video (Optional)**: Add a YouTube link if available.
---
### **5. Set Permissions**
Your **manifest.json** should have:
```json
"permissions": [
"contextMenus",
"downloads",
"storage",
"notifications",
"<all_urls>"
]
```
Confirm that all requested permissions are justified in the **Privacy Policy**.
---
### **6. Add Privacy & Contact Details**
- **Privacy Policy**: If user data is handled, add a policy link.
- **Support URL**: Link to your GitHub repository or website.
- **Email Contact**: Provide an email for user support.
---
### **7. Publish & Submit for Review**
1. Click **“Submit for Review”**.
2. Wait for Google’s approval (can take hours to days).
3. Once approved, your extension will be live!
---
### **8. Promote Your Extension**
- Share it on **Reddit, Twitter, Hacker News, and GitHub**.
- Submit to **AI and productivity communities**.
- Improve **SEO** on the Chrome Store listing.
---
Need help optimizing the listing further? Let me know! 🚀
gpt-4o
write the permission justifications
Here are the **permission justifications** for your Chrome extension listing:
### **Permission Justifications for AI Filename Generator**
1. **`contextMenus`** – *Required to add a right-click menu option for users to generate AI-based filenames when saving images.*
2. **`downloads`** – *Needed to save images with AI-generated filenames and manage file naming before download.*
3. **`storage`** – *Used to store user preferences, such as filename format templates and customization settings.*
4. **`notifications`** – *Allows the extension to display status updates and error messages, ensuring a smooth user experience.*
5. **`<all_urls>`** – *Required to access image URLs for AI analysis, ensuring the extension can process images from any website.*
These permissions ensure seamless functionality while prioritizing user privacy. The extension processes images **locally** with **Ollama**, so no data is sent to external servers.
Let me know if you need further refinements! 🚀
gpt-4o
now for tabs, declariativeNetRequestWithHostAccess, activeTab, nativeMessaging and host
Here are the **permission justifications** for the additional requested permissions:
---
### **Permission Justifications for AI Filename Generator**
1. **`tabs`** – *Allows the extension to access open tabs to retrieve the current page's context when generating filenames (e.g., extracting metadata or webpage title for more descriptive filenames).*
2. **`declarativeNetRequestWithHostAccess`** – *Used to modify network requests efficiently without requiring full host permissions. This can help in handling API requests to the locally running Ollama instance while maintaining security and performance.*
3. **`activeTab`** – *Allows temporary access to the currently active tab when the user interacts with the extension (e.g., clicking the extension icon). This is useful for analyzing the image content without requiring persistent tab access.*
4. **`nativeMessaging`** – *Required for communication between the Chrome extension and the locally installed Ollama instance, enabling local AI processing without sending data to external servers.*
5. **`host` (specific domains)** – *If your extension needs access to specific sites (e.g., `http://localhost:11434` for Ollama), this permission ensures the extension can communicate with the local AI model while restricting access to unnecessary external domains.*
---
These justifications ensure compliance with Chrome Web Store policies while maintaining security and privacy. Let me know if you need any adjustments! 🚀
gpt-4o
remote code justification
If your Chrome extension **loads or executes remote code**, you'll need a **clear justification** for it when submitting to the Chrome Web Store. Chrome has strict policies against remote code execution for security reasons, so the justification must emphasize necessity, security measures, and compliance.
---
### **Justification for Remote Code Execution**
**Why Remote Code is Needed:**
The AI Filename Generator extension interacts with **Ollama**, a locally hosted AI model, to generate filenames. While the extension does not directly execute remote code, it **makes requests to a local server (`http://localhost:11434`)** to process images.
**Security Measures in Place:**
1. **No External Servers** – The extension only communicates with the **user's own device**, not third-party servers.
2. **Restricted Host Access** – The extension uses `host_permissions` for **specific, limited domains** (i.e., `http://localhost:11434`) rather than broad `<all_urls>` access.
3. **No Arbitrary Code Execution** – The extension does **not** download or execute arbitrary scripts from the internet. It only sends image data to **a locally controlled service** (Ollama) for processing.
4. **User Consent Required** – The AI processing only runs **when the user initiates it**, preventing unintended or background execution.
**Compliance with Chrome Web Store Policies:**
- The extension does not violate **Manifest V3** requirements, as all scripts are bundled within the extension package.
- Any external execution is **strictly limited** to the local AI model, reducing security risks.
---
### **How to Ensure Approval in Chrome Web Store**
- **Clearly document** in the extension description that remote execution is only for **local AI processing**.
- **Avoid unnecessary permissions** that could raise security concerns.
- **Mention that no data leaves the user's device**, reinforcing privacy and security.
Would you like help drafting a **policy compliance section** for your Web Store listing? 🚀
gpt-4o
If user data is handled, add a policy link.
Since your Chrome extension processes **image data** to generate filenames, you may need a **Privacy Policy** to comply with Chrome Web Store requirements. Below is a **sample privacy policy** you can host on your website (e.g., GitHub Pages, Netlify) and link to in your Chrome Web Store listing.
---
## **Privacy Policy for AI Filename Generator**
### **1. Data Collection & Usage**
This extension processes images **locally on your device** using the **Ollama AI model**. No image data, filenames, or user information is transmitted to external servers.
### **2. Permissions & Justifications**
The extension requests the following permissions:
- **`contextMenus`** – To provide right-click functionality for saving images with AI-generated filenames.
- **`downloads`** – To rename and save images to your local storage.
- **`storage`** – To store user preferences (e.g., filename format settings).
- **`nativeMessaging`** – To communicate with the locally installed Ollama AI model.
### **3. Third-Party Services**
This extension does not use third-party servers or analytics. All AI processing happens locally via **Ollama running on `http://localhost:11434`**.
### **4. Security & Privacy Measures**
- No data is stored or shared externally.
- The extension only interacts with images **when the user explicitly chooses to use AI-generated filenames**.
- The extension does **not collect personally identifiable information (PII)**.
### **5. Contact Information**
If you have any questions about this Privacy Policy, you can reach us at:
📧 [Your Email or GitHub Issues Page]
---
### **Hosting & Linking to the Privacy Policy**
- **GitHub Pages:** If you have a GitHub repo, create a `privacy-policy.md` file and enable GitHub Pages.
- **Netlify/Vercel:** Deploy a simple HTML page with the privacy policy text.
- **Google Docs/Public Pastebin:** A simple option but less professional.
Let me know if you need help setting this up! 🚀
gpt-4o
write a .md of my privacy policy
Here’s a **Markdown (.md) file** for your **Privacy Policy** that you can host on GitHub Pages, Netlify, or any other platform.
I'll create the file now.
gpt-4o
Your **Privacy Policy** is now available in Markdown format. You can host it on GitHub Pages, Netlify, or any platform of your choice. Let me know if you need any modifications! 🚀
gpt-4o
An extension must have a single purpose that is narrow and easy-to-understand.
Your extension **AI Filename Generator** has a clear and well-defined purpose: **to generate AI-powered filenames for images when downloading them**. However, to comply with Chrome Web Store policies, ensure that all permissions and functionalities directly contribute to this purpose without adding unnecessary features.
To align with Chrome's **single-purpose policy**, focus on:
- **Image processing & filename generation** as the core function.
- Justifying all permissions strictly within this purpose.
- Avoiding unrelated features that could make the extension seem multi-purpose.
Does your extension currently include any extra features outside **AI filename generation for images**? If so, we may need to adjust the scope to keep it narrowly focused.
gpt-4o
write the single purpose description
**Single-Purpose Description:**
The **AI Filename Generator** Chrome Extension is designed solely to generate **descriptive filenames for images** when downloading them. It uses **local AI processing (Ollama with LLaVa)** to analyze image content and suggest meaningful filenames, enhancing file organization and retrieval.
All features, permissions, and functionality are strictly focused on enabling **AI-powered filename generation** while ensuring **user privacy and local processing**.
gpt-4o
what subreddit could I post it to
You can post about your **AI Filename Generator** Chrome extension in subreddits that focus on **productivity, AI, Chrome extensions, and automation**. Here are some good options:
### **Best Subreddits for Your Extension:**
- [r/chrome](https://www.reddit.com/r/chrome/) – Discussions about Chrome features and extensions
- [r/ChromeExtensions](https://www.reddit.com/r/ChromeExtensions/) – Perfect for launching and discussing Chrome extensions
- [r/ArtificialIntelligence](https://www.reddit.com/r/ArtificialIntelligence/) – If you focus on the AI aspect (LLaVa + Ollama)
- [r/selfhosted](https://www.reddit.com/r/selfhosted/) – Since it runs locally with Ollama, self-hosting enthusiasts may like it
- [r/productivity](https://www.reddit.com/r/productivity/) – If you frame it as a **workflow improvement tool**
- [r/opensource](https://www.reddit.com/r/opensource/) – If you're making the source code publicly available
- [r/technology](https://www.reddit.com/r/technology/) – If you explain the innovation behind it
- [r/automation](https://www.reddit.com/r/automation/) – If you highlight how it **automates file naming**
- [r/datahoarder](https://www.reddit.com/r/datahoarder/) – They love tools that improve file organization
Would you like help writing the **Reddit post** for engagement? 🚀
gpt-4o
write a post for /r/artificial intelligence using my voice and how I write about it
**Title:** *Built a Chrome Extension That Uses Local AI (LLaVa) to Generate Filenames for Images*
Hey everyone,
I got tired of downloading images named **“IMG_20240223_132459.jpg”** and having to manually rename them to something useful. So I built a **Chrome extension** that uses **local AI (LLaVa + Ollama)** to **analyze image content and generate descriptive filenames automatically** before saving them. No more digging through random files trying to figure out what’s what.
### **How It Works:**
- Right-click an image → “Save with AI-generated filename”
- The extension runs **LLaVa locally** (so no external API calls, no data leaves your machine)
- It suggests a filename based on what’s in the image (e.g., *“golden-retriever-playing-park.jpg”*)
- Option to preview/edit before saving
- Supports **custom filename templates** (`{object}-{location}-{date}.jpg`)
### **Why Local AI?**
Most AI-powered tools send your data to a server. I don’t like that. This one runs **entirely on your machine** using **Ollama**, which means:
✅ **Private** – No cloud processing, everything stays local
✅ **Fast** – No latency from API calls
✅ **Free** – No subscription or token limits
### **Tech Stack:**
- **LLaVa for image analysis**
- **Ollama as the local model runner**
- **Chrome Extension API (contextMenus, downloads, storage, etc.)**
- **DeclarativeNetRequest for host access**
### **Who Might Find This Useful?**
- People who **download a lot of images** and hate messy filenames
- **Researchers, content creators, designers**—anyone who needs better file organization
- Privacy-conscious users who want **AI features without sending data online**
### **Try It Out / Feedback?**
I’d love to hear thoughts from others working with **local AI**, **Chrome extensions**, or **automation tools**. Would you use something like this? Any features you’d want added?
If you’re interested, I can drop a link once I finish prepping for the Chrome Web Store submission. 🚀
gpt-4o