08PWEImplemented

Graphic assets panel

A control panel for non-technical users to view and replace website graphics — with dimension validation, format conversion and upload to WordPress.

My role
Panel interface, image processing and integration with WordPress
Context
PWE · internal app
Technologies
JavaScript · Canvas API · PHP · WordPress · pako · UPNG.js
PNG · WebP · JPEGconversion and compressionin the browser (Canvas API)

In a nutshell

  1. Problem

    Trade fair websites contain dozens of files with strictly defined names, dimensions and formats. Replacing them manually required an understanding of the website’s structure and the preparation of the resources.

  2. Solution

    A resource catalogue with previews, organised by groups and in PL/EN versions. The panel flags missing files and incorrect dimensions, accepts files and folders via drag-and-drop, renames them, converts and compresses images within the browser, and finally uploads them to WordPress.

  3. Outcome

    Less reliance on the developer when replacing core assets, and automatic validation of files prior to publication.

Problem

Event websites use a large number of files, each with a specific purpose: PL/EN logos in light and dark versions, PNG and WebP files, email banners, backgrounds, tiles, badge designs and promotional materials. Each has a required name, format, dimensions and, often, a file size limit.

Updating these files used to involve contacting a developer or someone with access to the website’s file structure — and carried the risk of a file ending up in the wrong place. The dashboard allows an authorised employee to view the full set of event materials, spot any omissions or errors, and upload corrections themselves: from replacing a single file to preparing an entire folder for a new edition.

Dashboard features

  • Preview graphics by type and language variant.
  • Flagging missing files and incorrect dimensions.
  • Replacement of a single file and bulk import with name matching.
  • Standardisation of names containing hyphens and underscores.
  • Filling in missing format variants from an available file.
  • PNG/WebP/JPEG conversion, compression and resizing within tolerance limits.
  • Preview, validation and change report before sending to WordPress via the API.

Dimension adjustment only works for images with preserved aspect ratios and a minor difference in resolution — if a file cannot be safely accepted, the employee is notified.

Asset directory and interface

A single asset directory describes each file: expected filename, section, width, height, preview background colour, card type and maximum file size. This serves as the single source of truth for presentation and validation.

  • Sections: logos, email headers, backgrounds, tiles and identifiers, promotional materials and others.
  • Brand colours from the trade fair data, the event name and the website address in the panel header.
  • Previews on a light or dark background as appropriate.
  • Required name and limit displayed on each card; errors shown on individual cards and collectively by section.
  • Edit mode: select a file, drag onto a tab or import an entire folder.

Folder validation and import

The check detects missing files, incorrect dimensions, incompatible file extensions and exceeded file size limits — based on the actual image dimensions, rather than just the filename or declared file type. Each issue is marked separately and accompanied by a message.

When importing a folder, filenames are normalised, files are matched to the expected positions, and the report shows which items have been matched, converted, skipped and rejected. For selected materials, a missing PL variant may be generated from the EN version — with exceptions where this would alter the meaning of the promotional graphic.

The preview shows the file before it is sent, by decoding it locally in the browser. Temporary URLs are released, and obsolete asynchronous operations are cancelled.

In-browser conversion

The image processing module uses the Canvas API: it loads the graphic, renders it on the canvas and encodes it into the target format with optimisation depending on the type of resource.

  • PNG — via UPNG.js and pako.
  • WebP — the browser’s native encoder, with several quality levels tested.
  • JPEG — with a white background, so that transparency does not turn into a black background.

Missing format variants can be generated automatically. Minor differences in dimensions are corrected by scaling only if the aspect ratio remains consistent and the deviation is within 10 per cent — completely distorted images will not be ‘fixed’ by stretching. Conversion takes place locally; only accepted files are sent to the server.

Integration with WordPress and the generator

Once the changes are approved, the panel hands the files over to the WordPress site through a secured integration. The site checks what it received once more and sends back the result, after which the previews refresh — the employee immediately sees what has been saved.

The panel is linked to the promotional materials generator: first, graphics are uploaded or checked; then, ready-to-use advertising files are generated using the latest event data.

Result

Some of the day-to-day updates to materials have shifted from specialist technical support to staff using the internal application. There are fewer errors resulting from incorrect dimensions and names, and it takes less time to locate a missing file. I don’t have a figure for the annual savings, so I’ll describe the value in terms of specific tasks: self-service uploads, bulk imports, validation and conversion without having to navigate through files on different websites.