Skip to content

Integrate the Python Image Optimisation Engine into the Product Gallery Widget #62

Description

@digitalrisedorset

Summary

Enhance the Product Gallery widget to use the Python Image Optimisation Engine, enabling asynchronous image optimisation while preserving the existing user experience.

Motivation

The Product Gallery is the first widget that directly benefits from on-demand image optimisation. Unlike the banner, product images are dynamic and may not have been optimised before they are requested.

The widget should continue to display the original images immediately while transparently initiating optimisation in the background.

Objectives

  • Integrate the Product Gallery with the Python Image Optimisation Engine.
  • Trigger optimisation only when required.
  • Never delay image rendering.
  • Prepare the widget for future approval and notification workflows.

Functional Requirements

The Product Gallery shall:

  • Detect whether an optimised image is available.
  • Display the original image when no optimised version exists.
  • Trigger asynchronous optimisation through the Python engine.
  • Continue rendering without waiting for optimisation to complete.
  • Automatically use optimised images on subsequent requests once they become available.
  • Prevent duplicate optimisation requests for the same image.

Non-functional Requirements

  • No degradation of page load performance.
  • No interruption to the customer experience.
  • Integration must rely solely on the public API exposed by the Python engine.
  • Optimisation failures must not affect the Product Gallery.

Out of Scope

  • Manual approval workflow.
  • Notification pipeline.
  • CDN integration.
  • Mage-OS integration.
  • Optimisation of other widgets.

Acceptance Criteria

  • The Product Gallery successfully delegates image optimisation to the Python engine.
  • Original images are displayed immediately when no optimised version exists.
  • Image optimisation occurs asynchronously.
  • Optimised images are used automatically on future requests.
  • Duplicate optimisation jobs are avoided.
  • The widget remains fully functional if the Python engine is unavailable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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