wp-media / wp-media/imagify-plugin

Add WordPress.org Live Preview support

Open
#999 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
82
Forks
31
Avg merge
5d 10h
Merged PRs (30d)
9

Description

Imagify Image Optimization currently doesn't support Live Previews on its WordPress.org plugin page.

I started working on a Live Preview Blueprint, but realized that Imagify requires a API Key to work.
While users could land on the Your Account page and setup a API key (try it in Playground), it would be a better user experience if there was a existing API Key they could use during the Live Preview.

Please let me know if I can help you get started with Playground or using Live Previews on WordPress.org,

Blueprint examples

Open Your Account
{
  "landingPage": "/wp-admin/admin.php?page=imagify",
  "steps": [
    {
      "step": "installPlugin",
      "pluginData": {
        "resource": "wordpress.org/plugins",
        "slug": "imagify"
      },
      "options": {
        "activate": true
      }
    }
  ]
}
Open General Settings with a working API Key
{
  "landingPage": "/wp-admin/admin.php?page=imagify",
  "steps": [
    {
      "step": "installPlugin",
      "pluginData": {
        "resource": "wordpress.org/plugins",
        "slug": "imagify"
      },
      "options": {
        "activate": true
      }
    },
    {
      "step": "defineWpConfigConsts",
      "consts": {
        "IMAGIFY_API_KEY": "<WORKING-API-KEY>"
      }
    }
  ]
}
Open General Settings by overriding the licence transient

This is probably the worst option. It would load your plugin, but every optimization attempt would file due to a missing API key.

{
  "landingPage": "/wp-admin/admin.php?page=imagify",
  "steps": [
    {
      "step": "installPlugin",
      "pluginData": {
        "resource": "wordpress.org/plugins",
        "slug": "imagify"
      },
      "options": {
        "activate": true
      }
    },
    {
      "step": "mkdir",
      "path": "/wordpress/wp-content/mu-plugins"
    },
    {
      "step": "writeFile",
      "path": "/wordpress/wp-content/mu-plugins/my-plugin-2.php",
      "data": "<?php add_filter( 'pre_transient_imagify_check_licence_1', '__return_true' );"
    }
  ]
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the WordPress.org Live Preview and Playground Blueprint documentation, then trace how Imagify currently obtains and validates its API key. The issue provides no file or test entry point; done means a Live Preview can open the plugin with a working, appropriately scoped API key without requiring visitor setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
developer-experience, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.