https://github.com/jeffpaul/classifai-local-media-http
Serve attachment URLs over http on .local sites to avoid self-signed certificate issues that break image processing (for example when ClassifAI reads media via URL).
https://github.com/jeffpaul/classifai-local-media-http
classifai https images local plugin ssl wordpress
Last synced: 28 days ago
JSON representation
Serve attachment URLs over http on .local sites to avoid self-signed certificate issues that break image processing (for example when ClassifAI reads media via URL).
- Host: GitHub
- URL: https://github.com/jeffpaul/classifai-local-media-http
- Owner: jeffpaul
- License: gpl-2.0
- Created: 2025-08-20T04:54:38.000Z (10 months ago)
- Default Branch: develop
- Last Pushed: 2025-08-20T18:55:15.000Z (10 months ago)
- Last Synced: 2025-08-28T20:29:03.191Z (10 months ago)
- Topics: classifai, https, images, local, plugin, ssl, wordpress
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.txt
- License: LICENSE
Awesome Lists containing this project
README
=== ClassifAI - Local Media over HTTP ===
Contributors: jeffpaul
Tags: classifai, local, ssl, https, images
Tested up to: 6.8
Stable tag: 0.1.0
License: GPL-2.0-or-later
License URI: https://spdx.org/licenses/GPL-2.0-or-later.html
Serve attachment URLs over http on .local sites to avoid self-signed certificate issues that break image processing (for example when ClassifAI reads media via URL).
== Description ==
On local development environments that use a self-signed certificate, PHP may fail to fetch media over https with errors like:
- `SSL routines:tls_process_server_certificate:certificate verify failed`
This plugin forces media URLs to use http when your site's host ends with `.local` or equals `localhost`. It targets:
- `wp_get_attachment_url()`
- `wp_get_attachment_image_src()`
- `wp_calculate_image_srcset()`
- Uploads base URL from `wp_upload_dir()`
It is safe to remove in production.
== Installation ==
1. Upload the ZIP in Plugins → Add New → Upload Plugin.
2. Activate the plugin.
3. Go to your media workflow and try again.
== Filters ==
- `clmh_is_local( $is_local, $host )` — return true to enable forcing http even if your domain does not end with .local.
== Changelog ==
= 0.1.0 =
* First release.