Skip to content

Refactor the Banner Optimisation Pipeline to Use the Python Image Optimisation Engine #61

Description

@digitalrisedorset

Summary

Replace the banner-specific image optimisation implementation with the standalone Python Image Optimisation Engine, making the banner pipeline the first consumer of the reusable optimisation service.

Motivation

The current banner optimisation workflow is tightly coupled to the ReactEdge pipeline. This makes it difficult to reuse across other widgets and prevents the optimisation capability from evolving independently.

This issue will validate the Python engine by integrating it into an existing production workflow while preserving the current behaviour.

Objectives

  • Remove image optimisation logic from the banner pipeline.
  • Delegate all optimisation work to the Python Image Optimisation Engine.
  • Preserve the existing banner optimisation workflow.
  • Ensure the integration remains transparent to the rest of the ReactEdge pipeline.

Functional Requirements

The banner pipeline shall:

  • Detect images requiring optimisation.
  • Delegate optimisation requests to the Python engine.
  • Consume the optimisation results.
  • Continue generating the expected banner output.
  • Gracefully handle optimisation failures by falling back to the original images.

The Python engine becomes the single component responsible for image optimisation.

Non-functional Requirements

  • No behavioural regression for existing banner functionality.
  • Existing deployment process remains unchanged.
  • The integration should introduce no widget-specific logic into the Python engine.
  • Communication between ReactEdge and the Python engine should occur through its public API only.

Out of Scope

  • Product Gallery integration.
  • Minicart integration.
  • Approval workflow.
  • Notification pipeline.
  • CDN integration.
  • Mage-OS integration.

Acceptance Criteria

  • Banner optimisation produces the same output as the current implementation.
  • All image optimisation is delegated to the Python engine.
  • The banner pipeline contains no image optimisation implementation details.
  • Optimisation failures do not prevent banner generation.
  • The integration demonstrates that the Python engine can be reused by additional widgets without modification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinteroperabilityIntegrates external platform capabilities

    Type

    Fields

    No fields configured for Task.

    Projects

    Status
    Todo
    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions