close
Skip to content

Ensure client side image file naming matches server #75302

@adamsilverstein

Description

@adamsilverstein

Description

When the client-side media experiment is active, uploading or drag-and-dropping an image causes the original filename to be stripped and replaced with a generic image prefix. File names should ideally match what happens with the existing server side approach.

This was noted by @andrewserong during review of #74566 but is not caused by that PR — it occurs whenever the client-side media experiment is enabled.

Steps to Reproduce

  1. Enable the Client Side Media experiment (Gutenberg → Experiments → Enable Client Side Media)
  2. Create or open a post in the block editor
  3. Upload or drag and drop an image with a distinctive filename (e.g., IMG_7977.jpg)
  4. Check the image details in the sidebar or Media Library

Expected Behavior

The uploaded image and its sub-sizes should retain the original filename as a prefix (e.g., IMG_7977-scaled.jpeg, IMG_7977-1024x768.jpeg).

Actual Behavior

The original filename is stripped and replaced with a generic image prefix (e.g., image-scaled.jpeg, image-1024x768.jpeg).

Screenshot from the sidebar showing the generic filename:

Image showing generic 'image' filename prefix in sidebar

Screenshot showing files created from client and server based processing of same image, note file names:

Image

Context

Reported in: #74566 (review)

Metadata

Metadata

Labels

[Feature] Client Side MediaMedia processing in the browser with WASM[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions