patelutkarsh/better-file-name

A WordPress plugin to rename the image based on the image content using openai.

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 15

Watchers: 3

Forks: 0

Open Issues: 0

Type:wordpress-plugin

1.4.2 2024-04-27 02:45 UTC

This package is auto-updated.

Last update: 2024-04-27 02:46:28 UTC


README

Description

This WordPress plugin renames files to be more readable using an open API (gpt-4-vision) upon upload and generates accessible alt text for images.

Rename file idea for WordPress was originally purposed by Pascal Birchler in following tweet.

293571879-6d7dd824-c80a-4c14-90f1-06abf5331e79.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTQxODYyODgsIm5iZiI6MTcxNDE4NTk4OCwicGF0aCI6Ii81MDE1NDg5LzI5MzU3MTg3OS02ZDdkZDgyNC1jODBhLTRjMTQtOTBmMS0wNmFiZjUzMzFlNzkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDQyNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA0MjdUMDI0NjI4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjQ4M2ZjN2MxZDkwOGM5ZDg2ZTE0ZTRiMTcxNzdjZDc5Y2UxYzkyMWUzZTYxOTc0ODQ4NzRlMzg2NmQ1MjFkMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.fWhZma7MsIhwZB4E2BsbGbg0CSYnM4dbhM_tKOBvy-M

Additional features:

  • Allows generating featured image using dall-e-2 or dall-e-3 API.

Note: GPT-4 Vision is in preview, It is not recommended to use this plugin on a production site.

Demo:

demo.mp4

Installation

Manual Installation

  1. Download the zip file from the GitHub release
  2. Upload the plugin folder to /wp-content/plugins/.
  3. Activate the plugin through the 'Plugins' menu in WordPress.
  4. Set up the open API key from the settings page under the 'Tools' menu: /wp-admin/tools.php?page=better-file-name-settings

Composer Installation (if your setup supports composer autoloading)

  1. Run composer require patelutkarsh/better-file-name command.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Set up the open API key from the settings page under the 'Tools' menu: /wp-admin/tools.php?page=better-file-name-settings

Generate Missing Alt Text

Run following command to generate alt text for all images that do not have any.

wp better-file-name generate-alt-text --dry-run

This can take a while depending on the number of images on your site.