WP Manifestindependent plugin directory
manifest / developer / classifai-local-media-http

ClassifAI - Local Media over 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).

by Jeffrey Paul · github.com/jeffpaul/classifai-local-media-http · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/jeffpaul/classifai-local-media-http/archive/refs/heads/develop.zip

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.