Page MenuHomePhabricator

Image in table cell previewed at wrong aspect ratio after being swapped out
Closed, ResolvedPublic

Description

Swapping out an image, then viewing the visual diff, resulted in the new image being previewed at the dimensions of the old image:

image.png (662×888 px, 262 KB)

(The image dimensions render correctly in historical mode: https://en.wikipedia.org/w/index.php?title=Christmas_pudding&type=revision&diff=991578454&oldid=991324008&diffmode=visual)

Testing

  1. Edit this page in VE: https://en.wikipedia.beta.wmflabs.org/wiki/User:ESanders_(WMF)/sandbox/image?veaction=edit
  2. Open the image edit dialog for the image (double click on the table cell, then double click on the image
  3. Click "Change image" at the bottom
  4. Search for "christmas pudding heston" and c

hoose the first result (a tall/portrait photo of a christmas pudding), click "Use this image" and "Apply changes"

  1. Click "Publish changes..." then "Review your changes" in the save dialog to view the visual diff

Observed

  1. The image is shown stretched to fit the dimensions of the old image (see screenshot above)

Expected

  1. The image is shown in the correct aspect ratio:
    image.png (590×909 px, 158 KB)

Event Timeline

Change 754530 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Image model: Clear originalWidth/originalHeight attributes when changing source

https://gerrit.wikimedia.org/r/754530

Esanders renamed this task from Image previewed at wrong aspect ratio after being swapped out to Image in table cell previewed at wrong aspect ratio after being swapped out.Jan 17 2022, 3:41 PM

There is a separate issue of the old image not being shown (we should show the old image in red, and the new image in green) - but that will be resolved by our changes to table diffs: T158445

Change 754530 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Image model: Clear originalWidth/originalHeight attributes when changing source

https://gerrit.wikimedia.org/r/754530

matmarex moved this task from Incoming to QA on the Editing-team (Kanban Board) board.
matmarex added a project: Editing QA.
matmarex moved this task from Inbox to Low Priority on the Editing QA board.

Image is shown in the correct ratio as expected in the save dialog

Screenshot 2022-01-28 at 03.03.45.png (612×2 px, 85 KB)

The diff page as well

Screenshot 2022-01-28 at 03.02.39.png (706×1 px, 85 KB)

ppelberg claimed this task.